From 4960bd7f97f9bd344ad4bbedaabdd9351d6a0ed8 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 30 May 2016 07:50:57 +0000 Subject: [PATCH] Add missing declaration of ino_t. POSIX requires that 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. --- include/dirent.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/dirent.h b/include/dirent.h index b894bb84532..1ab949ccb37 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -38,15 +38,23 @@ * the getdirentries(2) system call. */ #include +#include #include #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 -- 2.45.0