aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/initlog.h2
-rw-r--r--src/loglevel.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/initlog.h b/src/initlog.h
index 244ff9a0..fbcedc72 100644
--- a/src/initlog.h
+++ b/src/initlog.h
@@ -1,4 +1,6 @@
+#define _GNU_SOURCE 1
+
#ifndef INITLOG_H
#define INITLOG_H
diff --git a/src/loglevel.c b/src/loglevel.c
index 04de2e46..de2a4e11 100644
--- a/src/loglevel.c
+++ b/src/loglevel.c
@@ -5,8 +5,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <linux/unistd.h>
-
-_syscall3(int,syslog,int,type,char *,bufp,int,len);
+#include <sys/syscall.h>
int main(int argc, char **argv) {
int level;
@@ -17,7 +16,7 @@ int main(int argc, char **argv) {
fprintf(stderr,"invalid log level %d\n",level);
exit(-1);
}
- if (!syslog(8,NULL,level)) {
+ if (!syscall(SYS_syslog,8,NULL,level)) {
exit(0);
} else {
perror("syslog");