blob: a1783a7adb8501492582e9a31a61045fb925a2b8 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From f3889e5870e9761ee6113fac7f38aa44cc43e46c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Sep 2022 00:30:52 -0700
4Subject: [PATCH] Define _GNU_SOURCE if HAVE_SIGSET is set
5
6This enforces using sigset() API which needs _GNU_SOURCE macro to be
7defined
8
9Upstream-Status: Submitted [https://github.com/blueness/sthttpd/pull/16]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/libhttpd.c | 5 ++++-
13 src/thttpd.c | 4 ++++
14 2 files changed, 8 insertions(+), 1 deletion(-)
15
16diff --git a/src/libhttpd.c b/src/libhttpd.c
17index fa42c10..669be11 100644
18--- a/src/libhttpd.c
19+++ b/src/libhttpd.c
20@@ -25,9 +25,12 @@
21 ** SUCH DAMAGE.
22 */
23
24-
25 #include <config.h>
26
27+#ifdef HAVE_SIGSET
28+#define _GNU_SOURCE
29+#endif
30+
31 //system headers
32 #include <sys/types.h>
33 #include <sys/param.h>
34diff --git a/src/thttpd.c b/src/thttpd.c
35index ad97188..3c7a449 100644
36--- a/src/thttpd.c
37+++ b/src/thttpd.c
38@@ -28,6 +28,10 @@
39
40 #include <config.h>
41
42+#ifdef HAVE_SIGSET
43+#define _GNU_SOURCE
44+#endif
45+
46 //system headers
47 #include <sys/param.h>
48 #include <sys/types.h>
49--
502.37.3
51