Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2016 07:50:57 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300986 - head/include
Message-ID:  <201605300750.u4U7ovxL067707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Mon May 30 07:50:57 2016
New Revision: 300986
URL: https://svnweb.freebsd.org/changeset/base/300986

Log:
  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.

Modified:
  head/include/dirent.h

Modified: head/include/dirent.h
==============================================================================
--- head/include/dirent.h	Mon May 30 06:49:01 2016	(r300985)
+++ head/include/dirent.h	Mon May 30 07:50:57 2016	(r300986)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605300750.u4U7ovxL067707>