scandir: Fix link error on Solaris 8.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Mar 2010 23:20:36 +0000 (00:20 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Mar 2010 23:20:36 +0000 (00:20 +0100)
ChangeLog
lib/scandir.c

index bac7b1a..c2e21c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-03-19  Bruno Haible  <bruno@clisp.org>
 
+       scandir: Fix link error on Solaris 8.
+       * lib/scandir.c (_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New fallback
+       macros.
+
+2010-03-19  Bruno Haible  <bruno@clisp.org>
+
        getusershell: Fix documentation.
        * doc/glibc-functions/endusershell.texi: Refer to the getusershell
        module.
index 498134f..63f70ad 100644 (file)
 
 #undef select
 
+#ifndef _D_EXACT_NAMLEN
+# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name)
+#endif
+#ifndef _D_ALLOC_NAMLEN
+# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
+#endif
+
 #if _LIBC
 # ifndef SCANDIR
 #  define SCANDIR scandir