]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
inet_ntop, inet_pton: Fix a link error on QNX.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 1 Jan 2026 04:20:49 +0000 (20:20 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 1 Jan 2026 04:20:49 +0000 (20:20 -0800)
* m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Also check for inet_ntop in
libsocket.
* m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise for inet_pton.

ChangeLog
m4/inet_ntop.m4
m4/inet_pton.m4

index 85628fbf0c64e749dd8a9878309d41ae7cd47dad..fd4314ef8b00fa3aa68f89549b411d52501c6b79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2025-12-31  Collin Funk  <collin.funk1@gmail.com>
 
+       inet_ntop, inet_pton: Fix a link error on QNX.
+       * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Also check for inet_ntop in
+       libsocket.
+       * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise for inet_pton.
+
        sys_stat-h tests: Fix a static_assert failure on QNX.
        * tests/test-sys_stat-h.c [__QNX__]: Don't check that blksize_t and
        blkcnt_t are signed. Add some parentheses for readability.
index 693bd51bcf3885da4b419e3fa8e67d02c5feeb2a..e9843626adca7b32a780b088a836690df9aedc68 100644 (file)
@@ -1,5 +1,5 @@
 # inet_ntop.m4
-# serial 22
+# serial 23
 dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
   dnl Solaris 8..10 provide inet_ntop in libnsl instead.
   dnl Solaris 2.6..7 provide inet_ntop in libresolv instead.
   dnl Haiku provides it in -lnetwork.
+  dnl QNX provides it in -lsocket.
   dnl Native Windows provides it in -lws2_32 instead, with a declaration in
   dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl
   dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
@@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
     fi
   else
     gl_saved_LIBS=$LIBS
-    AC_SEARCH_LIBS([inet_ntop], [nsl resolv network], [],
+    AC_SEARCH_LIBS([inet_ntop], [nsl resolv network socket], [],
       [AC_CHECK_FUNCS([inet_ntop])
        if test $ac_cv_func_inet_ntop = no; then
          HAVE_INET_NTOP=0
index b6e59a25cec791564b35a1fef68a338a5925db9b..1426cb0974f4e9b6e31d1d535a42212881b29d5d 100644 (file)
@@ -1,5 +1,5 @@
 # inet_pton.m4
-# serial 20
+# serial 21
 dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_PTON],
   dnl Solaris 8..10 provide inet_pton in libnsl instead.
   dnl Solaris 2.6..7 provide inet_pton in libresolv instead.
   dnl Haiku provides it in -lnetwork.
+  dnl QNX provides it in -lsocket.
   dnl Native Windows provides it in -lws2_32 instead, with a declaration in
   dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl
   dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
@@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_PTON],
     fi
   else
     gl_saved_LIBS=$LIBS
-    AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [],
+    AC_SEARCH_LIBS([inet_pton], [nsl resolv network socket], [],
       [AC_CHECK_FUNCS([inet_pton])
        if test $ac_cv_func_inet_pton = no; then
          HAVE_INET_PTON=0