When building trunk or 1.5.x on OpenBSD-5.0 (and maybe others), I get
*LOTS* of the following:
/usr/include/arpa/inet.h:74: warning: 'struct in_addr' declared inside
parameter list
/usr/include/arpa/inet.h:74: warning: its scope is only this
definition or declaration, which is probably not what you want
/usr/include/arpa/inet.h:75: warning: 'struct in_addr' declared inside
parameter list
This is trivial to fix by including netinet/in.h before arpa/inet.h (see
attached patch).
The patch applies cleanly to both the trunk and the 1.5 branch (perhaps
to hold back until 1.6)
-Paul
--
Paul H. Hargrove phhargr...@lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
--- openmpi-1.7a1r25944/opal/include/opal/types.h~ Fri Feb 17 12:01:41 2012
+++ openmpi-1.7a1r25944/opal/include/opal/types.h Fri Feb 17 11:58:46 2012
@@ -33,6 +33,9 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
--- openmpi-1.7a1r25944/orte/mca/rml/oob/rml_oob_component.c~ Fri Feb 17 12:11:58 2012
+++ openmpi-1.7a1r25944/orte/mca/rml/oob/rml_oob_component.c Fri Feb 17 12:12:08 2012
@@ -23,6 +23,9 @@
#include "orte_config.h"
#include "orte/constants.h"
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
--- openmpi-1.7a1r25944/ompi/mca/btl/tcp/btl_tcp_proc.c~ Fri Feb 17 12:11:06 2012
+++ openmpi-1.7a1r25944/ompi/mca/btl/tcp/btl_tcp_proc.c Fri Feb 17 12:11:21 2012
@@ -19,11 +19,11 @@
#include "ompi_config.h"
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
#endif
#include "opal/class/opal_hash_table.h"