diff options
author | Ron Yorston <rmy@pobox.com> | 2023-04-16 13:13:52 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-04-16 13:13:52 +0100 |
commit | 74734bff81dc2e1a5b160d5621eeea35c5defabd (patch) | |
tree | fdc363020207ff3538023a1a37a801a1fb9ea9b3 /libbb/xfuncs.c | |
parent | 86ff1772f25dff819c1983418ac36822745a6d19 (diff) | |
download | busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.tar.gz busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.tar.bz2 busybox-w32-74734bff81dc2e1a5b160d5621eeea35c5defabd.zip |
libbb: don't build useless functions
The functions ndelay_on(), ndelay_off() and close_on_exec_on()
don't do anything useful because our fcntl(2) implementation
doesn't support the features they require.
Replace them with stubs.
Saves 176-208 bytes.
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index cbeb24701..813985194 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "libbb.h" | 23 | #include "libbb.h" |
24 | 24 | ||
25 | /* Turn on nonblocking I/O on a fd */ | 25 | /* Turn on nonblocking I/O on a fd */ |
26 | #if !ENABLE_PLATFORM_MINGW32 | ||
26 | int FAST_FUNC ndelay_on(int fd) | 27 | int FAST_FUNC ndelay_on(int fd) |
27 | { | 28 | { |
28 | int flags = fcntl(fd, F_GETFL); | 29 | int flags = fcntl(fd, F_GETFL); |
@@ -45,6 +46,7 @@ void FAST_FUNC close_on_exec_on(int fd) | |||
45 | { | 46 | { |
46 | fcntl(fd, F_SETFD, FD_CLOEXEC); | 47 | fcntl(fd, F_SETFD, FD_CLOEXEC); |
47 | } | 48 | } |
49 | #endif | ||
48 | 50 | ||
49 | char* FAST_FUNC strncpy_IFNAMSIZ(char *dst, const char *src) | 51 | char* FAST_FUNC strncpy_IFNAMSIZ(char *dst, const char *src) |
50 | { | 52 | { |