Skip to content

Commit

Permalink
fix signal and strings includes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosQuildu committed Jul 30, 2024
1 parent 4a361e8 commit 44d08d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cpp/test/include/libc/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
#ifndef HEADER_SIGNAL_STUB_H
#define HEADER_SIGNAL_STUB_H

#ifdef __cplusplus
extern "C" {
#endif

#define SIGALRM 14
#define SIGSEGV 11
#define SIGTERM 15
#define SIG_ERR -1
#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);

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cpp/test/include/libc/string_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 44d08d5

Please sign in to comment.