Bruno Haible wrote:
The function is not present on any other system, I checked.


It was introduced in OpenBSD 5.6 and was added to FreeBSD in 11.1.

Hmm, the NetBSD man page says it's available in NetBSD 8 in the _OPENBSD_SOURCE namespace, which is news to me. This means the extensions module needs to define yet another symbol (and the proposed module should depend on the extensions module). I installed the attached to do the extensions-module part of this.
From 36ddcbbea36a2a110dd05ffc3611ab020905e94e Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 8 Aug 2017 11:07:06 -0700
Subject: [PATCH] extensions: add _OPENBSD_SOURCE

* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
---
 ChangeLog        | 5 +++++
 m4/extensions.m4 | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index bd7eb1f..6c418df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-08  Paul Eggert  <egg...@cs.ucla.edu>
+
+	extensions: add _OPENBSD_SOURCE
+	* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
+
 2017-08-06  Reuben Thomas  <r...@sc3d.org>
             Bruno Haible  <br...@clisp.org>
 
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index c60f537..0c16bb8 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 15  -*- Autoconf -*-
+# serial 16  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc.
@@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
+/* Enable OpenBSD extensions on NetBSD.  */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
 /* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
@@ -128,6 +132,7 @@ dnl configure.ac when using autoheader 2.62.
   AC_DEFINE([_ALL_SOURCE])
   AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
+  AC_DEFINE([_OPENBSD_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
-- 
2.7.4

Reply via email to