summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2016-05-30 07:50:57 +0000
committered <ed@FreeBSD.org>2016-05-30 07:50:57 +0000
commit4960bd7f97f9bd344ad4bbedaabdd9351d6a0ed8 (patch)
treea8a13b3b48c5c67bd4986ccfa611bda47675b51d
parentc6c038186e70739cc085f3823fa70790d23324f7 (diff)
downloadFreeBSD-src-4960bd7f97f9bd344ad4bbedaabdd9351d6a0ed8.zip
FreeBSD-src-4960bd7f97f9bd344ad4bbedaabdd9351d6a0ed8.tar.gz
Add missing declaration of ino_t.
POSIX requires that <dirent.h> provides ino_t in the XSI case. In our case, this wasn't being exposed, as d_ino is a macro that expands to d_fileno that is an uint32_t, not an ino_t.
-rw-r--r--include/dirent.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h
index b894bb8..1ab949c 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -38,15 +38,23 @@
* the getdirentries(2) system call.
*/
#include <sys/cdefs.h>
+#include <sys/_types.h>
#include <sys/dirent.h>
#if __XSI_VISIBLE
+
+#ifndef _INO_T_DECLARED
+typedef __ino_t ino_t;
+#define _INO_T_DECLARED
+#endif
+
/*
* XXX this is probably illegal in the __XSI_VISIBLE case, but brings us closer
* to the specification.
*/
#define d_ino d_fileno /* backward and XSI compatibility */
-#endif
+
+#endif /* __XSI_VISIBLE */
#if __BSD_VISIBLE
OpenPOWER on IntegriCloud