blob: 8abb876c7b088b3c9a66a1fd0c3ad1e7bb955d3b [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 13c32916b4baab58d93940d57fea9ff0777f1931 Mon Sep 17 00:00:00 2001
2From: Baruch Siach <baruch@tkos.co.il>
3Date: Tue, 5 Jun 2018 19:21:46 +0300
4Subject: [PATCH] flopen: Add missing <fcntl.h> include
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Commit 993828d84ee (Add flopenat() function from FreeBSD) dropped the
10fcntl.h header. This breaks the build with musl libc:
11
12flopen.c: In function vflopenat’:
13flopen.c:60:14: error: O_CREAT undeclared (first use in this function)
14 if (flags & O_CREAT) {
15 ^~~~~~~
16
17Restore the fcntl.h header include to fix the build.
18
19Fixes: commit 993828d84eed0468c6c15b2818e534e6b134b8e4
20Submitted-also-by: parazyd <parazyd@dyne.org>
21Signed-off-by: Baruch Siach <baruch@tkos.co.il>
22Signed-off-by: Guillem Jover <guillem@hadrons.org>
23
24Upstream-Status: Backport
25[https://gitlab.freedesktop.org/libbsd/libbsd/commit/13c32916b4baab58d93940d57fea9ff0777f1931]
26
27Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
28---
29 src/flopen.c | 1 +
30 1 file changed, 1 insertion(+)
31
32diff --git a/src/flopen.c b/src/flopen.c
33index b9972c9..ff20d07 100644
34--- a/src/flopen.c
35+++ b/src/flopen.c
36@@ -32,6 +32,7 @@
37 #include <sys/stat.h>
38
39 #include <errno.h>
40+#include <fcntl.h>
41 #include <stdarg.h>
42 #include <unistd.h>
43
44--
452.7.4
46