From d21f7581581031501adc4a52a5b3438b522d853f Mon Sep 17 00:00:00 2001 From: o9000 Date: Fri, 8 Sep 2017 16:35:17 +0200 Subject: [PATCH] Fix build on various architectures --- CMakeLists.txt | 7 ++----- src/signals.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81cc0c9..711fc6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/src/signals.c b/src/signals.c index 478f326..cbaf252 100644 --- a/src/signals.c +++ b/src/signals.c @@ -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};