[OpenWrt-Devel] [PATCH] tools/flock: fix compile on Alpine Linux

Dirk Neukirchen dirkneukirchen at web.de
Mon Mar 7 16:08:31 EST 2016


fixes build errors:
src/flock.c:208:34: error: 'O_NOCTTY' undeclared (first use in this function)
     fd = open(filename, O_RDONLY|O_NOCTTY|O_CREAT, 0666);
src/flock.c:208:43: error: 'O_CREAT' undeclared (first use in this function)
     fd = open(filename, O_RDONLY|O_NOCTTY|O_CREAT, 0666);

Signed-off-by: Dirk Neukirchen <dirkneukirchen at web.de>
---
 tools/flock/src/flock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/flock/src/flock.c b/tools/flock/src/flock.c
index 13baec4..3ac3a4b 100644
--- a/tools/flock/src/flock.c
+++ b/tools/flock/src/flock.c
@@ -39,6 +39,7 @@
 #include <sys/file.h>
 #include <sys/time.h>
 #include <sys/wait.h>
+#include <fcntl.h>
 
 #define PACKAGE_STRING "util-linux-ng 2.18"
 #define _(x) (x)
-- 
2.7.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list