here reviewed patch
what about this error ?
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I/usr/local/include -I/usr/local/include/libpng -I/share2/tmp/_testing/ntop/ntop-cvs-HEAD/ntop/myrrd -DOPENBSD -I/usr/local/include -I/usr/local/include -I/usr/local/include/libpng -I/share2/tmp/_testing/ntop/ntop-cvs-HEAD/ntop/myrrd -g -I/usr/include/glib-1.2 -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC -g -I/usr/include/glib-1.2 -I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC -c sessions.c -Wp,-MD,.deps/sessions.TPlo -fPIC -DPIC -o .libs/sessions.lo sessions.c: In function `processScsiPkt': sessions.c:2390: incompatible types in assignment sessions.c:2391: incompatible types in assignment sessions.c:2418: incompatible types in assignment sessions.c:2419: incompatible types in assignment sessions.c:2440: incompatible types in assignment sessions.c:2441: incompatible types in assignment sessions.c:2461: incompatible types in assignment sessions.c:2479: incompatible types in assignment sessions.c:2485: incompatible types in assignment sessions.c:2486: incompatible types in assignment sessions.c: In function `handleFcSession': sessions.c:2998: incompatible types in assignment sessions.c:3005: incompatible types in assignment gmake[2]: *** [sessions.lo] Error 1
Regards
Julien
Index: ntop.h =================================================================== RCS file: /export/home/ntop/ntop/ntop.h,v retrieving revision 2.144 diff -U3 -r2.144 ntop.h --- ntop.h 22 Dec 2003 12:30:30 -0000 2.144 +++ ntop.h 23 Dec 2003 15:39:20 -0000 @@ -192,6 +192,12 @@ #ifdef HAVE_NET_IF_DL_H #include <net/if_dl.h> #endif + +/* this must be before route.h on openbsd */ +#ifndef WIN32 + #include <sys/socket.h> +#endif + #ifdef HAVE_NET_ROUTE_H #include <net/route.h> #endif @@ -258,10 +264,6 @@ * universal headers for network programming code * * **************************************************************************************/ - -#ifndef WIN32 - #include <sys/socket.h> -#endif #ifdef HAVE_SYS_UN_H #include <sys/un.h>
Index: configure.in
===================================================================
RCS file: /export/home/ntop/ntop/configure.in,v
retrieving revision 2.185
diff -U3 -r2.185 configure.in
--- configure.in 23 Dec 2003 11:16:42 -0000 2.185
+++ configure.in 23 Dec 2003 15:39:04 -0000
@@ -1978,6 +1978,9 @@
dnl> The failed recheck stuff below is courtesy of Chris Turbeville [EMAIL PROTECTED]
dnl> Chris developed this for Solaris 9, confirming work I had done earlier for
FreeBSD
AC_CHECK_HEADERS([net/if.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif])
@@ -2001,10 +2004,19 @@
#endif])
AC_CHECK_HEADERS([netinet/in_systm.h])
AC_CHECK_HEADERS([netinet/ip.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
AC_CHECK_HEADERS([netinet/ip_icmp.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -2019,11 +2031,22 @@
#endif])
AC_CHECK_HEADERS([netinet/tcp.h])
AC_CHECK_HEADERS([netinet/udp.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
-AC_CHECK_HEADERS([sys/sysctl.h net/if_dl.h])
+AC_CHECK_HEADERS([sys/param.h])
+AC_CHECK_HEADERS([net/if_dl.h])
+AC_CHECK_HEADERS([sys/sysctl.h], [], [], [
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif])
AC_CHECK_HEADERS([net/route.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif])
@@ -2061,7 +2084,6 @@
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([memory.h])
AC_CHECK_HEADERS([sys/ldr.h])
-AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([sys/select.h])
AC_CHECK_HEADERS([sys/sockio.h])
AC_CHECK_HEADERS([sys/stat.h])
@@ -2093,6 +2115,13 @@
no)
AC_DEFINE_UNQUOTED(INET6, 1, [Enable/disable ipv6 support])
AC_CHECK_HEADERS([ip6.h icmp6.h])
+ AC_CHECK_HEADERS([netinet/ip6.h netinet/icmp6.h], [], [], [
+ #if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #if HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif])
AC_CHECK_FUNCS([sysctl])
;;
esac
