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