0001-configure-add-D_GNU_SOURCE.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From dadb157df58e79c7f560cacae80ea51953606fca Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 11 Apr 2021 11:02:20 +0200
  4. Subject: [PATCH] configure: add -D_GNU_SOURCE
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This will fix the following build failure with uclibc-ng which is raised
  9. since version 1.0.6.1 and
  10. https://github.com/skarnet/s6-linux-init/commit/355a75e08bbc8af8af97576bad07471dd1b431d8:
  11. src/shutdown/s6-linux-init-shutdownd.c: In function ‘main’:
  12. src/shutdown/s6-linux-init-shutdownd.c:294:24: error: ‘F_DUPFD_CLOEXEC’ undeclared (first use in this function); did you mean ‘FD_CLOEXEC’?
  13. 294 | fd[0] = fcntl(1, F_DUPFD_CLOEXEC, 0) ;
  14. | ^~~~~~~~~~~~~~~
  15. | FD_CLOEXEC
  16. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  17. [Upstream status: https://github.com/skarnet/s6-linux-init/pull/3]
  18. ---
  19. configure | 2 +-
  20. 1 file changed, 1 insertion(+), 1 deletion(-)
  21. diff --git a/configure b/configure
  22. index 47db5b2..90fbb3b 100755
  23. --- a/configure
  24. +++ b/configure
  25. @@ -138,7 +138,7 @@ getmacrostring () {
  26. # Actual script
  27. CC_AUTO=
  28. -CPPFLAGS_AUTO="-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -iquote src/include-local -Isrc/include"
  29. +CPPFLAGS_AUTO="-D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -iquote src/include-local -Isrc/include"
  30. CPPFLAGS_POST="$CPPFLAGS"
  31. CPPFLAGS=
  32. CFLAGS_AUTO="-pipe -Wall"
  33. --
  34. 2.30.2