summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dirent.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/dirent.h b/include/dirent.h
index f5301cbb510..920421b565a 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -39,6 +39,13 @@
#define _DIRENT_H_
/*
+ * POSIX doesn't mandate this, but X/Open XPG 4.2 does.
+ */
+#ifndef _POSIX_SOURCE
+#include <sys/types.h>
+#endif
+
+/*
* The kernel defines the format of directory entries returned by
* the getdirentries(2) system call.
*/