[klibc] [PATCH] include: [sys/file.h] define flock(2) there

maximilian attems max at stro.at
Tue Sep 6 06:48:14 PDT 2011


SUSv3 is silent on that definition, but seen several userspace
software that expects flock to be defined in that file and
complain that it is missing in klibc. Current declaration is in
unistd.h.

Signed-off-by: maximilian attems <max at stro.at>
---
 usr/include/sys/file.h |    9 +++++++++
 usr/include/unistd.h   |    1 -
 2 files changed, 9 insertions(+), 1 deletions(-)
 create mode 100644 usr/include/sys/file.h

diff --git a/usr/include/sys/file.h b/usr/include/sys/file.h
new file mode 100644
index 0000000..7b580f3
--- /dev/null
+++ b/usr/include/sys/file.h
@@ -0,0 +1,9 @@
+#ifndef _SYS_FILE_H
+#define _SYS_FILE_H
+
+/* LOCK_ definitions */
+#include <fcntl.h>
+
+__extern int flock(int, int);
+
+#endif /* _SYS_FILE_H */
diff --git a/usr/include/unistd.h b/usr/include/unistd.h
index f286c33..3eaeaee 100644
--- a/usr/include/unistd.h
+++ b/usr/include/unistd.h
@@ -105,7 +105,6 @@ __extern int dup(int);
 __extern int dup2(int, int);
 __extern int fcntl(int, int, ...);
 __extern int ioctl(int, int, void *);
-__extern int flock(int, int);
 __extern int ftruncate(int, off_t);
 
 /*
-- 
1.7.5.4



More information about the klibc mailing list