From 6f919c2e855482c1c7c184faa4f541ffcd1b885a Mon Sep 17 00:00:00 2001 From: Isaac Rowe <9010221+irowebbn@users.noreply.github.com> Date: Tue, 24 Oct 2023 20:18:23 +0000 Subject: [PATCH] Add compile definitions for self-contained build --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4e2fea..09bc356 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,4 +8,10 @@ add_executable(elf2cfetbl elf2cfetbl.c) install(TARGETS elf2cfetbl DESTINATION host) - +# The _XOPEN_SOURCE directive is required for glibc to enable conformance with the +# the X/Open standard version 6, which includes POSIX.1c as well as SUSv2/UNIX98 extensions. +# Needed in this target to get PATH_MAX in limits.h and ctime_r +target_compile_definitions(elf2cfetbl + PRIVATE + _XOPEN_SOURCE=600 + )