diff --git a/CMakeLists.txt b/CMakeLists.txt index 711fc6e..f5ceef4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,11 @@ if( NOT IMLIB_BUILD_WITH_X ) endif( NOT IMLIB_BUILD_WITH_X ) -add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_WITH_GETLINE ) +add_definitions( -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_WITH_GETLINE ) + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + add_definitions( -D_POSIX_C_SOURCE=200809L ) +endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") include_directories( ${PROJECT_BINARY_DIR} diff --git a/src/util/area.c b/src/util/area.c index 38a9fa1..5e04caa 100644 --- a/src/util/area.c +++ b/src/util/area.c @@ -1173,7 +1173,7 @@ double compute_control_point_offset(Area *area, Offset *offset) double height = element_area->height; double radius = sqrt(element_area->width * element_area->width + element_area->height * element_area->height) / 2.0; - double left, top; + double left = 0, top = 0; if (offset->element == ELEMENT_SELF) { left = 0; top = 0; diff --git a/src/util/gradient.h b/src/util/gradient.h index b9fede1..413ea3b 100644 --- a/src/util/gradient.h +++ b/src/util/gradient.h @@ -67,11 +67,10 @@ void cleanup_gradient(GradientClass *g); // Gradient instances associated to Areas struct Area; -typedef struct Area Area; typedef struct GradientInstance { GradientClass *gradient_class; - Area *area; + struct Area *area; cairo_pattern_t *pattern; } GradientInstance;