Fix build on various architectures

This commit is contained in:
o9000 2017-09-08 16:35:17 +02:00
parent f2741116a7
commit d21f758158
2 changed files with 3 additions and 6 deletions

View file

@ -84,11 +84,7 @@ if( NOT IMLIB_BUILD_WITH_X )
endif( NOT IMLIB_BUILD_WITH_X )
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE )
else(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions( -D_WITH_GETLINE )
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_WITH_GETLINE )
include_directories( ${PROJECT_BINARY_DIR}
@ -147,6 +143,7 @@ set( SOURCES src/config.c
src/util/cache.c
src/util/color.c
src/util/gradient.c
src/util/uevent.c
src/util/window.c )
if( ENABLE_BATTERY )

View file

@ -29,7 +29,7 @@ void init_signals()
// Set signal handlers
signal_pending = 0;
struct sigaction sa_chld = {.sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT | SA_RESTART};
struct sigaction sa_chld = {.sa_handler = SIG_IGN};
sigaction(SIGCHLD, &sa_chld, 0);
struct sigaction sa = {.sa_handler = signal_handler, .sa_flags = SA_RESTART};