Skip to content

Commit

Permalink
pythongh-91962: Fix hstrerror detection issues on Solaris (pythonGH…
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikjak authored Oct 30, 2024
1 parent dcad8fe commit 1064141
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 9 deletions.
85 changes: 82 additions & 3 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5311,10 +5311,13 @@ AS_VAR_IF([ac_cv_broken_unsetenv], [yes], [
dnl check for true
AC_CHECK_PROGS([TRUE], [true], [/bin/true])

dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
dnl On some systems (e.g. Solaris), hstrerror and inet_aton are in -lresolv
dnl On others, they are in the C library, so we to take no action
AC_CHECK_LIB([c], [inet_aton], [$ac_cv_prog_TRUE],
AC_CHECK_LIB([resolv], [inet_aton])
AC_CHECK_LIB([resolv], [inet_aton], [SOCKET_LIBS="-lresolv"])
)
AC_CHECK_LIB([c], [hstrerror], [$ac_cv_prog_TRUE],
AC_CHECK_LIB([resolv], [hstrerror], [SOCKET_LIBS="-lresolv"])
)

# On Tru64, chflags seems to be present, but calling it will
Expand Down Expand Up @@ -7789,7 +7792,7 @@ PY_STDLIB_MOD([mmap],
PY_STDLIB_MOD([_socket],
[], m4_flatten([test "$ac_cv_header_sys_socket_h" = "yes"
-a "$ac_cv_header_sys_types_h" = "yes"
-a "$ac_cv_header_netinet_in_h" = "yes"]))
-a "$ac_cv_header_netinet_in_h" = "yes"]), [], [$SOCKET_LIBS])

dnl platform specific extensions
PY_STDLIB_MOD([grp], [],
Expand Down
3 changes: 0 additions & 3 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,6 @@
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H

/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV

/* Define to 1 if you have the `sendfile' library (-lsendfile). */
#undef HAVE_LIBSENDFILE

Expand Down

0 comments on commit 1064141

Please sign in to comment.