summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-12-21 12:48:55 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-12-21 12:48:55 +0000
commitf3c9c3c70187967a670f1c059f5461dce745d92e (patch)
tree58bf50c6a4d4014e976aa6a9e6a69b4680b067de
parent8a3e5a8b05ad0a7fab63595b6b4eafec56f63f89 (diff)
downloadskalibs-f3c9c3c70187967a670f1c059f5461dce745d92e.tar.xz
GNU manages to botch dirfd() too. POSIX is hard!
-rw-r--r--NEWS1
-rw-r--r--doc/upgrade.html2
-rw-r--r--src/sysdeps/trydirfd.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 88ea4fe..e867f98 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Changelog for skalibs.
In 2.6.3.0
----------
+ - New dir_fd function wrapping dirfd() (Solaris doesn't have dirfd())
- memmem implementation for platforms that don't provide it.
- memmem wrappers: byte_search, siovec_search.
- New functions: atomic_symlink, skagetlnmaxsep.
diff --git a/doc/upgrade.html b/doc/upgrade.html
index b2d4500..587d609 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -19,6 +19,7 @@
<h2> in 2.6.3.0 </h2>
<ul>
+ <li> New dir_fd function wrapping dirfd() (Solaris doesn't have dirfd()). </li>
<li> memmem implementation for platforms that don't provide it. </li>
<li> memmem wrappers: byte_search, siovec_search. </li>
<li> New functions: atomic_symlink, skagetlnmaxsep. </li>
@@ -39,7 +40,6 @@
<li> New function: <a href="libstddjb/djbunix.html">lock_unx()</a>. </li>
</ul>
-
<h2> in 2.6.0.2 </h2>
<ul>
diff --git a/src/sysdeps/trydirfd.c b/src/sysdeps/trydirfd.c
index c2eccf2..2b65c53 100644
--- a/src/sysdeps/trydirfd.c
+++ b/src/sysdeps/trydirfd.c
@@ -3,6 +3,9 @@
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
#ifndef _NETBSD_SOURCE
#define _NETBSD_SOURCE
#endif