Jeremie Koenig
138ce54c9c
stty: sort out preprocessor conditionals
...
* Move the definitions of missing constants to the top of the file.
* Fix undefined IDX_xxx on missing termios constants.
* FreeBSD has TABDLY, TAB0 and TAB3, but no TAB1 or TAB2
* Omit the definition of set_window_size() if TIOCGWINSZ is not available.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-08-01 03:31:35 +02:00
Jeremie Koenig
63c2e7ecc0
klogd: make it work on non-linux systems
...
The klogctl() interface allows changing the console loglevel, but is
Linux-specific. The more portable method of reading from _PATH_KLOG is
added as an alternative.
Adapted from the Debian kFreeBSD patch at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/klogd.diff
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-08-01 03:01:44 +02:00
Jeremie Koenig
430ba79c39
cttyhack: serial console detection is Linux-specific
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-30 17:40:37 +02:00
Jeremie Koenig
68fca4cd55
vlock: disable linux console calls on other systems
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-30 03:03:29 +02:00
Jeremie Koenig
e7a0632b7b
bootchartd: mounting tmpfs is Linux-specific
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-30 01:16:00 +02:00
Jeremie Koenig
5a71fb8202
less: remove misguided dependency on PLATFORM_LINUX
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-30 01:15:46 +02:00
Jeremie Koenig
2ea12d8b6d
tcpsvd,udpsvd: conditionalize usage of SO_ORIGINAL_DST
...
On systems without this call, $TCPORIGDSTADDR is not set.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:46:57 +02:00
Jeremie Koenig
29885114a5
libbb: conditionalize AF_* usage in error reporting
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:46:47 +02:00
Jeremie Koenig
84b01d5afc
mkdir: fix -p on FreeBSD
...
This patch is libbb.make_directory.diff from Debian kFreeBSD at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:46:28 +02:00
Jeremie Koenig
816ed971e4
libbb.h: add device names for Hurd and FreeBSD
...
Adapted from include.libbb.diff from the Debian kFreeBSD people:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:46:23 +02:00
Jeremie Koenig
1c05303fdc
init: make the initial $TERM value configurable
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:46:00 +02:00
Jeremie Koenig
714674e4da
init,halt: portability improvements
...
* make init and halt use the same RB_* constants for reboot()
* conditionalize the Linux-specific code
Inspired by init.init.diff from the Debian kFreeBSD patches at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:45:51 +02:00
Jeremie Koenig
f812eace18
init,loginutils: termios portability fixes
...
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:45:42 +02:00
Jeremie Koenig
1d7266d3b5
mark Linux-specific configuration options
...
PLATFORM_LINUX is used as a dependency for applets or features
which require Linux-specific interfaces.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:44:56 +02:00
Jeremie Koenig
b175462422
readlink: use xmalloc_realpath()
...
Using realpath() directly with a non-NULL output buffer is unsafe because its
behavior is unspecified on systems which don't have PATH_MAX (ie. Hurd)
I beleive this also fixes a small bug whereby 'buf' would not be freed
on 'readlink -v' with ENABLE_FEATURE_CLEANUP.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-07-19 00:43:05 +02:00
Jérémie Koenig
fbedacfc8c
Hurd compat fixes. Mostly dealing with absent PATH_MAX
...
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org >
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com >
2010-03-26 19:08:53 +01:00