(Luca - your bug)

The stuff from ettercap had u_int8 not our u_int8_t.  I've updated the cvs.
It's only a problem on CFG_BIG_ENDIAN machines, so the i86 crowd is safe.

Also... per the split, since those are pseudo-functions, they should be
defined in globals-core.h NOT globals-defines.h -- as part of the same
commit I moved them to the right places.

-----Burton


/*
  Courtesy of http://ettercap.sourceforge.net/
*/
<snip/>
#ifndef CFG_LITTLE_ENDIAN
#define ptohs(x) ( (u_int16_t)                       \
                      ((u_int16_t)*((u_int8 *)x+1)<<8|  \
                      (u_int16_t)*((u_int8 *)x+0)<<0)   \
                    )

Should be:

#define ptohs(x) ( (u_int16_t)                       \
                      ((u_int16_t)*((u_int8_t *)x+1)<<8|  \
                      (u_int16_t)*((u_int8_t *)x+0)<<0)   \
                    )



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Pietro Bandera
Sent: Tuesday, February 04, 2003 4:15 AM
To: [EMAIL PROTECTED]
Subject: [Ntop] cvs compile error 2


with the last cvs (with changes just made) i got this new error


gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I/usr/include/pcap -I/usr/include -I/st
orage/lanit30beta/ntop_vari/new/gdchart0.94c -DLINUX -g -O2 -Wshadow -Wpoint
er-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC 
-DLINUX -g -O2 -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-decla
rations -Wnested-externs -fPIC -c pbuf.c -MT pbuf.lo -MD -MP -MF
.deps/pbuf.TPlo  -fPIC -DPIC -o .libs/pbuf.lo
pbuf.c: In function `processIpPkt':
pbuf.c:882: warning: initialization from incompatible pointer type
pbuf.c:915: `u_int8' undeclared (first use in this function)
pbuf.c:915: (Each undeclared identifier is reported only once
pbuf.c:915: for each function it appears in.)
pbuf.c:915: parse error before `)'
pbuf.c:915: parse error before `)'
make[2]: *** [pbuf.lo] Error 1


ppc gcc2.96 kernel 2.4.20


_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to