Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | From c1e9f2f3d086e0df3c10a2468fd7b37fd0c5038c Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 7 Sep 2022 00:02:08 -0700 |
| 4 | Subject: [PATCH] configure: Fix checks for system headers |
| 5 | |
| 6 | Define _DEFAULT_SOURCE in system.c so unistd.h can expose readlink API |
| 7 | |
| 8 | Upstream-Status: Pending |
| 9 | |
| 10 | Signed-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 | |
| 16 | diff --git a/configure.ac b/configure.ac |
| 17 | index 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 | |
| 29 | diff --git a/src/system.c b/src/system.c |
| 30 | index 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 | -- |
| 43 | 2.37.3 |
| 44 | |