summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/dirent.h5
-rw-r--r--newlib/libc/include/sys/unistd.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/newlib/libc/include/dirent.h b/newlib/libc/include/dirent.h
index eaa4c190d..9e33a0dcb 100644
--- a/newlib/libc/include/dirent.h
+++ b/newlib/libc/include/dirent.h
@@ -2,6 +2,11 @@
extern "C" {
#endif
#include <sys/dirent.h>
+
+#if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE)
+#define MAXNAMLEN 1024
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 87cf6108e..fa103a91f 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -176,10 +176,6 @@ long _EXFUN(sysconf, (int __name));
# define _PC_PRIO_IO 10
# define _PC_SYNC_IO 11
-# ifndef _POSIX_SOURCE
-# define MAXNAMLEN 1024
-# endif /* _POSIX_SOURCE */
-
/* FIXME: This is temporary until winsup gets sorted out. */
#ifdef __CYGWIN__
#define MAXPATHLEN (260 - 1 /* NUL */)