aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-10 20:08:44 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-10 20:08:44 +0000
commit9b2297a34e35be143155769a470331af2f2b9330 (patch)
tree9019a306ae6447fdb28db1843818c19cdbe2f2b9
parenta0053735dc102e8f876005627bc09be2446e48c0 (diff)
downloadbusybox-w32-9b2297a34e35be143155769a470331af2f2b9330.tar.gz
busybox-w32-9b2297a34e35be143155769a470331af2f2b9330.tar.bz2
busybox-w32-9b2297a34e35be143155769a470331af2f2b9330.zip
Remove yet more kernel header dependancies.
-Erik
-rw-r--r--coreutils/ln.c2
-rw-r--r--dmesg.c2
-rw-r--r--init.c2
-rw-r--r--init/init.c2
-rw-r--r--insmod.c5
-rw-r--r--ln.c2
-rw-r--r--miscutils/update.c2
-rw-r--r--modutils/insmod.c5
-rw-r--r--swaponoff.c2
-rw-r--r--sysklogd/syslogd.c2
-rw-r--r--syslogd.c2
-rw-r--r--update.c2
-rw-r--r--util-linux/dmesg.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--utility.c2
15 files changed, 16 insertions, 20 deletions
diff --git a/coreutils/ln.c b/coreutils/ln.c
index beaa58fac..3c45dee33 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -52,7 +52,7 @@ static int followLinks = TRUE;
52 52
53extern int ln_main(int argc, char **argv) 53extern int ln_main(int argc, char **argv)
54{ 54{
55 char *linkName, *dirName; 55 char *linkName, *dirName=NULL;
56 int linkIntoDirFlag; 56 int linkIntoDirFlag;
57 int stopIt = FALSE; 57 int stopIt = FALSE;
58 58
diff --git a/dmesg.c b/dmesg.c
index e88f549ca..b6c990d99 100644
--- a/dmesg.c
+++ b/dmesg.c
@@ -23,7 +23,7 @@
23 23
24#ifndef __alpha__ 24#ifndef __alpha__
25# define __NR_klogctl __NR_syslog 25# define __NR_klogctl __NR_syslog
26#include <linux/unistd.h> 26#include <sys/syscall.h>
27static inline _syscall3(int, klogctl, int, type, char *, b, int, len); 27static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
28#else /* __alpha__ */ 28#else /* __alpha__ */
29#define klogctl syslog 29#define klogctl syslog
diff --git a/init.c b/init.c
index 52440ef85..e0b465126 100644
--- a/init.c
+++ b/init.c
@@ -110,7 +110,7 @@ struct serial_struct {
110#if defined(__GLIBC__) 110#if defined(__GLIBC__)
111#include <sys/kdaemon.h> 111#include <sys/kdaemon.h>
112#else 112#else
113#include <linux/unistd.h> /* for _syscall() macro */ 113#include <sys/syscall.h> /* for _syscall() macro */
114static _syscall2(int, bdflush, int, func, int, data); 114static _syscall2(int, bdflush, int, func, int, data);
115#endif /* __GLIBC__ */ 115#endif /* __GLIBC__ */
116 116
diff --git a/init/init.c b/init/init.c
index 52440ef85..e0b465126 100644
--- a/init/init.c
+++ b/init/init.c
@@ -110,7 +110,7 @@ struct serial_struct {
110#if defined(__GLIBC__) 110#if defined(__GLIBC__)
111#include <sys/kdaemon.h> 111#include <sys/kdaemon.h>
112#else 112#else
113#include <linux/unistd.h> /* for _syscall() macro */ 113#include <sys/syscall.h> /* for _syscall() macro */
114static _syscall2(int, bdflush, int, func, int, data); 114static _syscall2(int, bdflush, int, func, int, data);
115#endif /* __GLIBC__ */ 115#endif /* __GLIBC__ */
116 116
diff --git a/insmod.c b/insmod.c
index 79732b017..469d056d3 100644
--- a/insmod.c
+++ b/insmod.c
@@ -41,7 +41,6 @@
41#include <getopt.h> 41#include <getopt.h>
42#include <sys/utsname.h> 42#include <sys/utsname.h>
43#include <sys/syscall.h> 43#include <sys/syscall.h>
44#include <linux/unistd.h>
45 44
46//---------------------------------------------------------------------------- 45//----------------------------------------------------------------------------
47//--------modutils module.h, lines 45-242 46//--------modutils module.h, lines 45-242
@@ -72,7 +71,7 @@
72#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
73#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
74 73
75#ident "$Id: insmod.c,v 1.13 2000/07/09 06:59:58 andersen Exp $" 74#ident "$Id: insmod.c,v 1.14 2000/07/10 20:08:44 andersen Exp $"
76 75
77/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
78 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -278,7 +277,7 @@ int delete_module(const char *);
278#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
279#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
280 279
281#ident "$Id: insmod.c,v 1.13 2000/07/09 06:59:58 andersen Exp $" 280#ident "$Id: insmod.c,v 1.14 2000/07/10 20:08:44 andersen Exp $"
282 281
283/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
284 283
diff --git a/ln.c b/ln.c
index beaa58fac..3c45dee33 100644
--- a/ln.c
+++ b/ln.c
@@ -52,7 +52,7 @@ static int followLinks = TRUE;
52 52
53extern int ln_main(int argc, char **argv) 53extern int ln_main(int argc, char **argv)
54{ 54{
55 char *linkName, *dirName; 55 char *linkName, *dirName=NULL;
56 int linkIntoDirFlag; 56 int linkIntoDirFlag;
57 int stopIt = FALSE; 57 int stopIt = FALSE;
58 58
diff --git a/miscutils/update.c b/miscutils/update.c
index b86d84e06..1fdf04a89 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "internal.h" 26#include "internal.h"
27#include <linux/unistd.h> 27#include <sys/syscall.h>
28#include <sys/param.h> 28#include <sys/param.h>
29#include <sys/syslog.h> 29#include <sys/syslog.h>
30 30
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 79732b017..469d056d3 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -41,7 +41,6 @@
41#include <getopt.h> 41#include <getopt.h>
42#include <sys/utsname.h> 42#include <sys/utsname.h>
43#include <sys/syscall.h> 43#include <sys/syscall.h>
44#include <linux/unistd.h>
45 44
46//---------------------------------------------------------------------------- 45//----------------------------------------------------------------------------
47//--------modutils module.h, lines 45-242 46//--------modutils module.h, lines 45-242
@@ -72,7 +71,7 @@
72#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
73#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
74 73
75#ident "$Id: insmod.c,v 1.13 2000/07/09 06:59:58 andersen Exp $" 74#ident "$Id: insmod.c,v 1.14 2000/07/10 20:08:44 andersen Exp $"
76 75
77/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
78 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -278,7 +277,7 @@ int delete_module(const char *);
278#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
279#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
280 279
281#ident "$Id: insmod.c,v 1.13 2000/07/09 06:59:58 andersen Exp $" 280#ident "$Id: insmod.c,v 1.14 2000/07/10 20:08:44 andersen Exp $"
282 281
283/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
284 283
diff --git a/swaponoff.c b/swaponoff.c
index 223436c29..bb8395fa4 100644
--- a/swaponoff.c
+++ b/swaponoff.c
@@ -28,7 +28,7 @@
28#include <mntent.h> 28#include <mntent.h>
29#include <dirent.h> 29#include <dirent.h>
30#include <errno.h> 30#include <errno.h>
31#include <linux/unistd.h> 31#include <sys/syscall.h>
32 32
33_syscall2(int, swapon, const char *, path, int, flags); 33_syscall2(int, swapon, const char *, path, int, flags);
34_syscall1(int, swapoff, const char *, path); 34_syscall1(int, swapoff, const char *, path);
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index aa1218f3f..a185a4cc3 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -40,7 +40,7 @@
40#include <sys/types.h> 40#include <sys/types.h>
41#include <sys/un.h> 41#include <sys/un.h>
42#include <sys/param.h> 42#include <sys/param.h>
43#include <linux/unistd.h> 43#include <sys/syscall.h>
44 44
45#if ! defined __GLIBC__ && ! defined __UCLIBC__ 45#if ! defined __GLIBC__ && ! defined __UCLIBC__
46 46
diff --git a/syslogd.c b/syslogd.c
index aa1218f3f..a185a4cc3 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -40,7 +40,7 @@
40#include <sys/types.h> 40#include <sys/types.h>
41#include <sys/un.h> 41#include <sys/un.h>
42#include <sys/param.h> 42#include <sys/param.h>
43#include <linux/unistd.h> 43#include <sys/syscall.h>
44 44
45#if ! defined __GLIBC__ && ! defined __UCLIBC__ 45#if ! defined __GLIBC__ && ! defined __UCLIBC__
46 46
diff --git a/update.c b/update.c
index b86d84e06..1fdf04a89 100644
--- a/update.c
+++ b/update.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "internal.h" 26#include "internal.h"
27#include <linux/unistd.h> 27#include <sys/syscall.h>
28#include <sys/param.h> 28#include <sys/param.h>
29#include <sys/syslog.h> 29#include <sys/syslog.h>
30 30
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index e88f549ca..b6c990d99 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -23,7 +23,7 @@
23 23
24#ifndef __alpha__ 24#ifndef __alpha__
25# define __NR_klogctl __NR_syslog 25# define __NR_klogctl __NR_syslog
26#include <linux/unistd.h> 26#include <sys/syscall.h>
27static inline _syscall3(int, klogctl, int, type, char *, b, int, len); 27static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
28#else /* __alpha__ */ 28#else /* __alpha__ */
29#define klogctl syslog 29#define klogctl syslog
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 223436c29..bb8395fa4 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -28,7 +28,7 @@
28#include <mntent.h> 28#include <mntent.h>
29#include <dirent.h> 29#include <dirent.h>
30#include <errno.h> 30#include <errno.h>
31#include <linux/unistd.h> 31#include <sys/syscall.h>
32 32
33_syscall2(int, swapon, const char *, path, int, flags); 33_syscall2(int, swapon, const char *, path, int, flags);
34_syscall1(int, swapoff, const char *, path); 34_syscall1(int, swapoff, const char *, path);
diff --git a/utility.c b/utility.c
index 97e0366ad..b4e0434d9 100644
--- a/utility.c
+++ b/utility.c
@@ -134,13 +134,11 @@ extern int get_kernel_revision(void)
134 134
135#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME 135#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME
136#include <sys/syscall.h> 136#include <sys/syscall.h>
137#include <linux/unistd.h>
138_syscall1(int, sysinfo, struct sysinfo *, info); 137_syscall1(int, sysinfo, struct sysinfo *, info);
139#endif /* BB_INIT */ 138#endif /* BB_INIT */
140 139
141#if defined BB_MOUNT || defined BB_UMOUNT 140#if defined BB_MOUNT || defined BB_UMOUNT
142#include <sys/syscall.h> 141#include <sys/syscall.h>
143#include <linux/unistd.h>
144 142
145#ifndef __NR_umount2 143#ifndef __NR_umount2
146#define __NR_umount2 52 144#define __NR_umount2 52