]> Savannah Git Hosting - gnulib.git/commitdiff
accept4: Fix compilation error on OpenIndiana.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Jun 2019 00:02:10 +0000 (02:02 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Jun 2019 00:03:06 +0000 (02:03 +0200)
Reported by Michal Nowak <mnowak@startmail.com>
via Mark H Weaver <mhw@netris.org>.

* m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not
whether it exists as a function.

ChangeLog
m4/accept4.m4

index 5ae108e25c46fc78d508f72a4203e30eba73fc21..e808c30a063cf1717c3f61b5ad79408d94c9a183 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-06-28  Bruno Haible  <bruno@clisp.org>
+
+       accept4: Fix compilation error on OpenIndiana.
+       Reported by Michal Nowak <mnowak@startmail.com>
+       via Mark H Weaver <mhw@netris.org>.
+       * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not
+       whether it exists as a function.
+
 2019-06-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        strverscmp: sync from glibc
index b38ce30249d7821bcec368fcb990991d931bab03..9b976fb72b21d280f254648823cb6786851fe188 100644 (file)
@@ -1,4 +1,4 @@
-# accept4.m4 serial 2
+# accept4.m4 serial 3
 dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,8 +11,11 @@ AC_DEFUN([gl_FUNC_ACCEPT4],
   dnl Persuade glibc <sys/socket.h> to declare accept4().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_FUNCS_ONCE([accept4])
-  if test $ac_cv_func_accept4 != yes; then
+  AC_CHECK_DECLS([accept4], , , [[
+#include <sys/types.h>
+#include <sys/socket.h>
+]])
+  if test $ac_cv_have_decl_accept4 != yes; then
     HAVE_ACCEPT4=0
   fi
 ])