Skip to content

Commit 34369b3

Browse files
authored
Merge pull request #12 from trailofbits/fix-includes
fix signal and strings includes
2 parents 4a361e8 + 44d08d5 commit 34369b3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cpp/test/include/libc/signal.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
#ifndef HEADER_SIGNAL_STUB_H
44
#define HEADER_SIGNAL_STUB_H
55

6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
610
#define SIGALRM 14
711
#define SIGSEGV 11
812
#define SIGTERM 15
913
#define SIG_ERR -1
1014
#define EXIT_FAILURE 2
1115
#define SA_SIGINFO 4
1216

13-
{} // to silent error from codeql's extractor
1417
typedef void (*sig_t)(int);
1518
extern int signal(int, sig_t);
1619

@@ -35,6 +38,9 @@ struct sigaction {
3538
extern int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
3639
extern int kill(int pid, int sig);
3740

41+
#ifdef __cplusplus
42+
}
43+
#endif
3844

3945
#endif
4046

cpp/test/include/libc/string_stubs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern void perror(const char *s);
2626

2727
extern void openlog(const char*, int, int);
2828
extern void syslog(int, const char*, ...);
29-
extern void closelog(void)
29+
extern void closelog(void);
3030

3131
#ifdef __cplusplus
3232
}

0 commit comments

Comments
 (0)