Fix build on various architectures
o9000 mrovi9000@gmail.com
3 files changed,
7 insertions(+),
4 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -84,7 +84,11 @@ message( FATAL_ERROR "Imlib is not built with X support" )
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}
M
src/util/area.c
→
src/util/area.c
@@ -1173,7 +1173,7 @@ double width = element_area->width;
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;
M
src/util/gradient.h
→
src/util/gradient.h
@@ -67,11 +67,10 @@ /////////////////////////////////////////
// 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;