From d2937299fad043fa91cdf7f56eef914558be4077 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 14 Mar 2016 16:17:38 -0500 Subject: Feature test macros overhaul: dirent.h MAXNAMLEN is a BSDism. Use the proper internal macros instead of !_POSIX_SOURCE. telldir and seekdir are XSI, scandir and alphasort are POSIX.1-2008, and scandirat is GNU. Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/dirent.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'newlib/libc/include') diff --git a/newlib/libc/include/dirent.h b/newlib/libc/include/dirent.h index 6fefc03cb..6135b9f6e 100644 --- a/newlib/libc/include/dirent.h +++ b/newlib/libc/include/dirent.h @@ -3,9 +3,10 @@ #ifdef __cplusplus extern "C" { #endif +#include #include -#if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE) +#if !defined(MAXNAMLEN) && __BSD_VISIBLE #define MAXNAMLEN 1024 #endif -- cgit v1.2.3