summaryrefslogtreecommitdiff
path: root/libc/unistd
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd')
-rw-r--r--libc/unistd/daemon.c2
-rw-r--r--libc/unistd/fpathconf.c6
-rw-r--r--libc/unistd/sysconf.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
index 53fd902bf..599c3c8e6 100644
--- a/libc/unistd/daemon.c
+++ b/libc/unistd/daemon.c
@@ -63,7 +63,7 @@
/* use clone() to get fork() like behavior here -- we just want to disassociate
* from the controlling terminal
*/
-pid_t _fork_parent(void)
+static inline pid_t _fork_parent(void)
{
INTERNAL_SYSCALL_DECL(err);
register long ret = INTERNAL_SYSCALL(clone, err, 2, CLONE_VM, 0);
diff --git a/libc/unistd/fpathconf.c b/libc/unistd/fpathconf.c
index 556343be2..82c34c4da 100644
--- a/libc/unistd/fpathconf.c
+++ b/libc/unistd/fpathconf.c
@@ -24,6 +24,8 @@
#include <sys/stat.h>
#include <sys/statfs.h>
+#define STAT stat64
+#define FSTAT fstat64
#ifndef __USE_FILE_OFFSET64
extern int fstatfs (int __fildes, struct statfs *__buf)
@@ -205,9 +207,9 @@ long int fpathconf(int fd, int name)
#if defined _POSIX_ASYNC_IO
{
/* AIO is only allowed on regular files and block devices. */
- struct stat st;
+ struct STAT st;
- if (fstat (fd, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
+ if (FSTAT (fd, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
return -1;
else
return 1;
diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index 172794e9c..d04705abb 100644
--- a/libc/unistd/sysconf.c
+++ b/libc/unistd/sysconf.c
@@ -46,7 +46,7 @@
long int get_phys_pages(void)
{
struct sysinfo si;
- int ps = getpagesize();;
+ int ps = getpagesize();
sysinfo(&si);
@@ -59,7 +59,7 @@ long int get_phys_pages(void)
long int get_avphys_pages(void)
{
struct sysinfo si;
- int ps = getpagesize();;
+ int ps = getpagesize();
sysinfo(&si);