[ofa-general] [PATCH] uDAPL v2: dapltest segfault on RHEL5 using inet_ntoa

Arlin Davis arlin.r.davis at intel.com
Wed Jan 23 16:36:54 PST 2008


dapltest does not include definitions for inet_ntoa. At load time the symbol was resloved but with
default definition of int, instead of char*, it caused a segfault. Add correct include files in
dapl_mdep_user.h.

Signed-off by: Arlin Davis <ardavis at ichips.intel.com>

diff --git a/test/dapltest/mdep/linux/dapl_mdep_user.h b/test/dapltest/mdep/linux/dapl_mdep_user.h
index 153c8c1..52199d1 100755
--- a/test/dapltest/mdep/linux/dapl_mdep_user.h
+++ b/test/dapltest/mdep/linux/dapl_mdep_user.h
@@ -43,6 +43,11 @@
 #include <string.h>
 #include <sys/times.h>
 
+/* inet_ntoa */
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 /* Default Device Name */
 #define DT_MdepDeviceName    "ofa-v2-ib0"
 




More information about the general mailing list