]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
flopen: Add missing <fcntl.h> include
authorBaruch Siach <baruch@tkos.co.il>
Tue, 5 Jun 2018 16:21:46 +0000 (19:21 +0300)
committerGuillem Jover <guillem@hadrons.org>
Sun, 17 Jun 2018 18:23:48 +0000 (20:23 +0200)
Commit 993828d84ee (Add flopenat() function from FreeBSD) dropped the
fcntl.h header. This breaks the build with musl libc:

flopen.c: In function ‘vflopenat’:
flopen.c:60:14: error: ‘O_CREAT’ undeclared (first use in this function)
  if (flags & O_CREAT) {
              ^~~~~~~

Restore the fcntl.h header include to fix the build.

Fixes: commit 993828d84eed0468c6c15b2818e534e6b134b8e4
Submitted-also-by: parazyd <parazyd@dyne.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
src/flopen.c

index b9972c94ec90e227fff65b0bc416f873956a5b0d..ff20d074445b03ec25a18c13972cd590d9120d94 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 
 #include <errno.h>
+#include <fcntl.h>
 #include <stdarg.h>
 #include <unistd.h>