Francois Gouget : iphlpapi: Check for proc_pidinfo() instead of assuming libproc.h always defines it.

Alexandre Julliard julliard at winehq.org
Wed Sep 4 15:08:32 CDT 2013


Module: wine
Branch: master
Commit: 4f27b78fb424e5623498d1d8d5f637f9334aa740
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4f27b78fb424e5623498d1d8d5f637f9334aa740

Author: Francois Gouget <fgouget at free.fr>
Date:   Tue Sep  3 17:36:05 2013 +0200

iphlpapi: Check for proc_pidinfo() instead of assuming libproc.h always defines it.

This is needed on FreeBSD 8.1.

---

 configure               |    1 +
 configure.ac            |    1 +
 dlls/iphlpapi/ipstats.c |    2 +-
 include/config.h.in     |    3 +++
 4 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 3514c1d..766ffdf 100755
--- a/configure
+++ b/configure
@@ -13414,6 +13414,7 @@ for ac_func in \
 	port_create \
 	prctl \
 	pread \
+	proc_pidinfo \
 	pwrite \
 	readdir \
 	readlink \
diff --git a/configure.ac b/configure.ac
index 8306fe2..038eec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2041,6 +2041,7 @@ AC_CHECK_FUNCS(\
 	port_create \
 	prctl \
 	pread \
+	proc_pidinfo \
 	pwrite \
 	readdir \
 	readlink \
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..aac10a5 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -633,6 +633,9 @@
 /* Define to 1 if you have the <process.h> header file. */
 #undef HAVE_PROCESS_H
 
+/* Define to 1 if you have the `proc_pidinfo' function. */
+#undef HAVE_PROC_PIDINFO
+
 /* Define to 1 if you have the `pthread_attr_get_np' function. */
 #undef HAVE_PTHREAD_ATTR_GET_NP
 




More information about the wine-cvs mailing list