From e2a99db2dd151e951ad7f31cc94d2f9b8e08ddc0 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Thu, 5 Dec 2019 12:02:35 -0500 Subject: [PATCH] Also Define _ATFILE_SOURCE --- programs/platform.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/programs/platform.h b/programs/platform.h index 5934e59cf..64ecd21fc 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -109,6 +109,15 @@ extern "C" { #endif /* PLATFORM_POSIX_VERSION */ +#if PLATFORM_POSIX_VERSION > 1 + /* glibc < 2.26 may not expose struct timespec def without this. + * See issue #1920. */ +# ifndef _ATFILE_SOURCE +# define _ATFILE_SOURCE +# endif +#endif + + /*-********************************************* * Detect if isatty() and fileno() are available ************************************************/