aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-04 20:39:09 +0000
committerBill Nottingham <notting@redhat.com>1999-02-04 20:39:09 +0000
commit0033528f4dbf21c4debb87bbe6f0b77be27bfc8e (patch)
treeec013bbfb1f9c694b12d5d9bf4bff70361cb7130
parent75b00704a85e1575a033246122292bb6a3044037 (diff)
downloadinitscripts-0033528f4dbf21c4debb87bbe6f0b77be27bfc8e.tar
initscripts-0033528f4dbf21c4debb87bbe6f0b77be27bfc8e.tar.gz
initscripts-0033528f4dbf21c4debb87bbe6f0b77be27bfc8e.tar.bz2
initscripts-0033528f4dbf21c4debb87bbe6f0b77be27bfc8e.tar.xz
initscripts-0033528f4dbf21c4debb87bbe6f0b77be27bfc8e.zip
fix syscall to something lots more portable
-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");