blob: d9bdc01ca1aa890b3fea1ec7baf592c961929b32 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Sep 2022 00:02:08 -0700
4Subject: [PATCH] configure: Fix checks for system headers
5
6Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 configure.ac | 2 +-
13 src/system.c | 2 ++
14 2 files changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index cdf1eba..6fc81e6 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -152,7 +152,7 @@ fi
21
22 dnl Checks for header files.
23
24-AC_CHECK_HEADERS( [unistd.h, stdint.h, inttypes.h])
25+AC_CHECK_HEADERS( [unistd.h stdint.h inttypes.h])
26
27 dnl Checks for typedefs, and compiler characteristics.
28
29diff --git a/src/system.c b/src/system.c
30index 4e008fa..98631a6 100644
31--- a/src/system.c
32+++ b/src/system.c
33@@ -36,6 +36,8 @@
34 * 1. specify the constants in "configed.H" or "noconfig.H",
35 * 2. append the system-dependent routines in this file.
36 */
37+
38+#define _DEFAULT_SOURCE
39 #if PREPROCESSED
40 #include "mcpp.H"
41 #else
42--
432.37.3
44