Module: wine Branch: master Commit: 032e8d9c362b881a4213c819d1cc6262f2df4b35 URL: https://gitlab.winehq.org/wine/wine/-/commit/032e8d9c362b881a4213c819d1cc626...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Feb 7 21:40:23 2023 +0100
configure: Check for pcap_init() instead of pcap_create().
pcap_init() will be required by later patches and it was introduced after pcap_create().
---
configure | 22 +++++++++++----------- configure.ac | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/configure b/configure index f07125ef8f6..aae3f417b67 100755 --- a/configure +++ b/configure @@ -15708,9 +15708,9 @@ fi
if test "$ac_cv_header_pcap_pcap_h" = "yes" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_create in -lpcap" >&5 -printf %s "checking for pcap_create in -lpcap... " >&6; } -if test ${ac_cv_lib_pcap_pcap_create+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_init in -lpcap" >&5 +printf %s "checking for pcap_init in -lpcap... " >&6; } +if test ${ac_cv_lib_pcap_pcap_init+y} then : printf %s "(cached) " >&6 else $as_nop @@ -15722,35 +15722,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -char pcap_create (); +char pcap_init (); int main (void) { -return pcap_create (); +return pcap_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_pcap_pcap_create=yes + ac_cv_lib_pcap_pcap_init=yes else $as_nop - ac_cv_lib_pcap_pcap_create=no + ac_cv_lib_pcap_pcap_init=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_create" >&5 -printf "%s\n" "$ac_cv_lib_pcap_pcap_create" >&6; } -if test "x$ac_cv_lib_pcap_pcap_create" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_init" >&5 +printf "%s\n" "$ac_cv_lib_pcap_pcap_init" >&6; } +if test "x$ac_cv_lib_pcap_pcap_init" = xyes then : PCAP_LIBS="-lpcap"
fi
fi -if test "x$ac_cv_lib_pcap_pcap_create" != xyes +if test "x$ac_cv_lib_pcap_pcap_init" != xyes then : case "x$with_pcap" in x) as_fn_append wine_notices "|pcap ${notice_platform}development files not found, wpcap won't be supported." ;; diff --git a/configure.ac b/configure.ac index 6410f8a0e42..3d996c34fae 100644 --- a/configure.ac +++ b/configure.ac @@ -1371,9 +1371,9 @@ WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes], dnl **** Check for libpcap **** if test "$ac_cv_header_pcap_pcap_h" = "yes" then - AC_CHECK_LIB(pcap,pcap_create,[AC_SUBST(PCAP_LIBS,["-lpcap"])]) + AC_CHECK_LIB(pcap,pcap_init,[AC_SUBST(PCAP_LIBS,["-lpcap"])]) fi -WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_create" != xyes], +WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_init" != xyes], [pcap ${notice_platform}development files not found, wpcap won't be supported.], [enable_wpcap])