diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-29 02:02:10 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-29 02:03:06 +0200 |
commit | e597d4b8e50f57cfb72ee4fb8ee75c48ddbec97f (patch) | |
tree | 5c72854ac7c960b6700ec94fa6f20d815b501ac0 | |
parent | c299f3ddac50b044dd3bad7998bbb51836b07229 (diff) | |
download | gnulib-e597d4b8e50f57cfb72ee4fb8ee75c48ddbec97f.tar.gz |
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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | m4/accept4.m4 | 9 |
2 files changed, 14 insertions, 3 deletions
@@ -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 diff --git a/m4/accept4.m4 b/m4/accept4.m4 index b38ce30249..9b976fb72b 100644 --- a/m4/accept4.m4 +++ b/m4/accept4.m4 @@ -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 ]) |