diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-05-20 13:00:07 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-05-20 13:00:07 -0700 |
commit | e1888aa26a1ea02436f7c13a1539c67c0e01a12b (patch) | |
tree | de502b0259c361c58f8b072ceb3def9bf44b313d /libc/unistd/daemon.c | |
parent | db8fd1125b2d1f8d748dc8505267f40bb49dfef8 (diff) | |
download | uClibc-alpine-e1888aa26a1ea02436f7c13a1539c67c0e01a12b.tar.bz2 uClibc-alpine-e1888aa26a1ea02436f7c13a1539c67c0e01a12b.tar.xz |
Only use fstat64 when LFS is enabled
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/unistd/daemon.c')
-rw-r--r-- | libc/unistd/daemon.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c index 6543f1c11..d71d25480 100644 --- a/libc/unistd/daemon.c +++ b/libc/unistd/daemon.c @@ -123,10 +123,18 @@ int daemon( int nochdir, int noclose ) #else if (!noclose) { - struct stat64 st; +#ifdef __UCLIBC_HAS_LFS__ + struct stat64 st; +#else + struct stat st; +#endif if ((fd = open_not_cancel(_PATH_DEVNULL, O_RDWR, 0)) != -1 +#ifdef __UCLIBC_HAS_LFS__ && (__builtin_expect (fstat64 (fd, &st), 0) == 0)) +#else + && (__builtin_expect (fstat (fd, &st), 0) == 0)) +#endif { if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0) { #endif |