iphlpapi: Check for proc_pidinfo() instead of assuming libproc.h always defines it.
Francois Gouget
fgouget at free.fr
Tue Sep 3 10:36:05 CDT 2013
This is needed on FreeBSD 8.1.
---
configure | 15 +++++++++++++++
configure.ac | 3 +++
dlls/iphlpapi/ipstats.c | 2 +-
include/config.h.in | 3 +++
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 0ca39bc..6f50ec0 100755
--- a/configure
+++ b/configure
@@ -12231,6 +12231,21 @@ esac
fi
test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
+ac_wine_check_funcs_save_LIBS="$LIBS"
+LIBS="$LIBS "
+for ac_func in proc_pidinfo
+do :
+ ac_fn_c_check_func "$LINENO" "proc_pidinfo" "ac_cv_func_proc_pidinfo"
+if test "x$ac_cv_func_proc_pidinfo" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PROC_PIDINFO 1
+_ACEOF
+
+fi
+done
+
+LIBS="$ac_wine_check_funcs_save_LIBS"
+
if test "$ac_cv_header_kstat_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
diff --git a/configure.ac b/configure.ac
index 9b21643..fa6d8aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1709,6 +1709,9 @@ WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes],
[libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.])
test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
+dnl **** Check for proc_pidinfo function ****
+WINE_CHECK_LIB_FUNCS(proc_pidinfo)
+
dnl **** Check for libkstat ****
if test "$ac_cv_header_kstat_h" = "yes"
then
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 809dbc6..1185f08 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2046,7 +2046,7 @@ static unsigned int find_owning_pid( struct pid_map *map, unsigned int num_entri
procstat_close( pstat );
return 0;
-#elif defined(HAVE_LIBPROC_H)
+#elif defined(HAVE_PROC_PIDINFO)
struct proc_fdinfo *fds;
struct socket_fdinfo sock;
unsigned int i, j, n, fd_len;
diff --git a/include/config.h.in b/include/config.h.in
index 643e2e1..0ac95f6 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -630,6 +630,9 @@
/* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD
+/* Define to 1 if you have the `proc_pidinfo' function. */
+#undef HAVE_PROC_PIDINFO
+
/* Define to 1 if you have the <process.h> header file. */
#undef HAVE_PROCESS_H
--
1.8.4.rc3
More information about the wine-patches
mailing list