From 44d08d5289c88cc3f0091d4baca8fb7209b64497 Mon Sep 17 00:00:00 2001 From: GrosQuildu Date: Tue, 30 Jul 2024 12:45:35 +0200 Subject: [PATCH] fix signal and strings includes --- cpp/test/include/libc/signal.h | 8 +++++++- cpp/test/include/libc/string_stubs.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cpp/test/include/libc/signal.h b/cpp/test/include/libc/signal.h index fcc0bf8..8963457 100644 --- a/cpp/test/include/libc/signal.h +++ b/cpp/test/include/libc/signal.h @@ -3,6 +3,10 @@ #ifndef HEADER_SIGNAL_STUB_H #define HEADER_SIGNAL_STUB_H +#ifdef __cplusplus +extern "C" { +#endif + #define SIGALRM 14 #define SIGSEGV 11 #define SIGTERM 15 @@ -10,7 +14,6 @@ #define EXIT_FAILURE 2 #define SA_SIGINFO 4 -{} // to silent error from codeql's extractor typedef void (*sig_t)(int); extern int signal(int, sig_t); @@ -35,6 +38,9 @@ struct sigaction { extern int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); extern int kill(int pid, int sig); +#ifdef __cplusplus +} +#endif #endif diff --git a/cpp/test/include/libc/string_stubs.h b/cpp/test/include/libc/string_stubs.h index 9310e50..a5cd662 100644 --- a/cpp/test/include/libc/string_stubs.h +++ b/cpp/test/include/libc/string_stubs.h @@ -26,7 +26,7 @@ extern void perror(const char *s); extern void openlog(const char*, int, int); extern void syslog(int, const char*, ...); -extern void closelog(void) +extern void closelog(void); #ifdef __cplusplus }