From 071c3f70b4c1ea60c26c859f834ef1de9bec2b77 Mon Sep 17 00:00:00 2001 From: Marc-Olivier Andrez <marc-olivier.andrez@desy.de> Date: Wed, 22 May 2024 15:28:29 +0200 Subject: [PATCH] build: fix GCC compilation error because of call of deprecated function `siginterrupt` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Error message: > main_eventmon.cpp:109:17: error: ‘int siginterrupt(int, int)’ is deprecated: Use sigaction with SA_RESTART instead [-Werror=deprecated-declarations] The current fix consists in ignoring the error message at the moment, but we should replace `siginterrupt` with `sigaction` in the future. --- producer/event_monitor_producer/src/main_eventmon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/producer/event_monitor_producer/src/main_eventmon.cpp b/producer/event_monitor_producer/src/main_eventmon.cpp index 04f13d3e5..39f0255e9 100644 --- a/producer/event_monitor_producer/src/main_eventmon.cpp +++ b/producer/event_monitor_producer/src/main_eventmon.cpp @@ -105,7 +105,9 @@ int main (int argc, char* argv[]) { stop_signal = 0; std::signal(SIGINT, SignalHandler); std::signal(SIGTERM, SignalHandler); -#if defined(__linux__) || defined (__APPLE__) +#if defined(__linux__) || defined(__APPLE__) + // FIXME +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" siginterrupt(SIGINT, 1); #endif -- GitLab