Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix signal and strings includes #12

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix signal and strings includes
GrosQuildu committed Jul 30, 2024
commit 44d08d5289c88cc3f0091d4baca8fb7209b64497
8 changes: 7 additions & 1 deletion cpp/test/include/libc/signal.h
Original file line number Diff line number Diff line change
@@ -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);

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

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