2
1

0001-flopen-fix-build-with-musl-libc.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 8575450b9c1226fc38196b29e33c67f2b58cacf5 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Tue, 5 Jun 2018 19:18:47 +0300
  4. Subject: [PATCH] flopen: fix build with musl libc
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Commit 993828d84ee (Add flopenat() function from FreeBSD) dropped the
  9. fcntl.h header. This breaks the build with musl libc:
  10. flopen.c: In function ‘vflopenat’:
  11. flopen.c:60:14: error: ‘O_CREAT’ undeclared (first use in this function)
  12. if (flags & O_CREAT) {
  13. ^~~~~~~
  14. Restore the fcntl.h header include to fix the build.
  15. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  16. ---
  17. Upstream status: sent to libbsd@lists.freedesktop.org
  18. src/flopen.c | 1 +
  19. 1 file changed, 1 insertion(+)
  20. diff --git a/src/flopen.c b/src/flopen.c
  21. index b9972c94ec90..ff20d074445b 100644
  22. --- a/src/flopen.c
  23. +++ b/src/flopen.c
  24. @@ -32,6 +32,7 @@
  25. #include <sys/stat.h>
  26. #include <errno.h>
  27. +#include <fcntl.h>
  28. #include <stdarg.h>
  29. #include <unistd.h>
  30. --
  31. 2.17.1