Here;'s the diff that works:
Index: sipcapture.c =================================================================== --- sipcapture.c (revision 8913) +++ sipcapture.c (working copy) @@ -79,7 +79,6 @@ #include "../../lib/kcore/statistics.h" #endif
- MODULE_VERSION
struct _sipcapture_object { Index: sipcapture.h =================================================================== --- sipcapture.h (revision 8913) +++ sipcapture.h (working copy) @@ -23,14 +23,18 @@ * */
+#ifndef IPPROTO_IPIP +#define IPPROTO_IPIP 4 +#endif
+ struct hep_hdr{ - u_int8_t hp_v; /* version */ - u_int8_t hp_l; /* length */ - u_int8_t hp_f; /* family */ - u_int8_t hp_p; /* protocol */ - u_int16_t hp_sport; /* source port */ - u_int16_t hp_dport; /* destination port */ + uint8_t hp_v; /* version */ + uint8_t hp_l; /* length */ + uint8_t hp_f; /* family */ + uint8_t hp_p; /* protocol */ + uint16_t hp_sport; /* source port */ + uint16_t hp_dport; /* destination port */ };
struct hep_iphdr{
On Fri, Oct 14, 2011 at 10:33 AM, Jason Penton jason.penton@gmail.comwrote:
Yes, Alexandr - I changed the uints already. IPPROTO works! Maybe you can stick a define in for Solaris ;)
Cheers Jason
2011/10/14 Alexandr Dubovikov alexandr.dubovikov@gmail.com
Hi Jason,
ok, Solaris has uint type, not u_int, and IPPROTO_IPIP can be fixed in this way:
#ifndef IPPROTO_IPIP #define IPIPPROTO_IPIP 4 #endif
Can you check it please, i don't have any Solaris here….
Wbr, Alexandr
14.10.2011, в 08:01, Jason Penton написал(а):
Hey Guys,
sipcapture is failing to build on Solaris. I am just dumping the trace
here as I don't have time to look at it now. I will however take a look when I get a chance.
CC (gcc) [M sipcapture.so] sipcapture.o In file included from sipcapture.c:76: sipcapture.h:28: error: syntax error before "u_int8_t" sipcapture.h:28: warning: no semicolon at end of struct or union sipcapture.h:29: warning: type defaults to `int' in declaration of
`hp_l'
sipcapture.h:29: warning: data definition has no type or storage class sipcapture.h:30: error: syntax error before "hp_f" sipcapture.h:30: warning: type defaults to `int' in declaration of
`hp_f'
sipcapture.h:30: warning: data definition has no type or storage class sipcapture.h:31: error: syntax error before "hp_p" sipcapture.h:31: warning: type defaults to `int' in declaration of
`hp_p'
sipcapture.h:31: warning: data definition has no type or storage class sipcapture.h:32: error: syntax error before "hp_sport" sipcapture.h:32: warning: type defaults to `int' in declaration of
`hp_sport'
sipcapture.h:32: warning: data definition has no type or storage class sipcapture.h:33: error: syntax error before "hp_dport" sipcapture.h:33: warning: type defaults to `int' in declaration of
`hp_dport'
sipcapture.h:33: warning: data definition has no type or storage class sipcapture.c: In function `mod_init': sipcapture.c:469: error: `IPPROTO_IPIP' undeclared (first use in this
function)
sipcapture.c:469: error: (Each undeclared identifier is reported only
once
sipcapture.c:469: error: for each function it appears in.) sipcapture.c: In function `hep_msg_received': sipcapture.c:638: error: invalid application of `sizeof' to incomplete
type `hep_hdr'
sipcapture.c:648: error: dereferencing pointer to incomplete type sipcapture.c:658: error: dereferencing pointer to incomplete type sipcapture.c:658: error: dereferencing pointer to incomplete type sipcapture.c:658: error: dereferencing pointer to incomplete type sipcapture.c:658: error: dereferencing pointer to incomplete type sipcapture.c:658: error: dereferencing pointer to incomplete type sipcapture.c:663: error: dereferencing pointer to incomplete type sipcapture.c:663: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:664: error: dereferencing pointer to incomplete type sipcapture.c:670: error: dereferencing pointer to incomplete type sipcapture.c:671: error: dereferencing pointer to incomplete type sipcapture.c:672: error: dereferencing pointer to incomplete type sipcapture.c:677: error: dereferencing pointer to incomplete type sipcapture.c:677: error: dereferencing pointer to incomplete type sipcapture.c:677: error: dereferencing pointer to incomplete type sipcapture.c:677: error: dereferencing pointer to incomplete type sipcapture.c:677: error: dereferencing pointer to incomplete type sipcapture.c:681: error: invalid application of `sizeof' to incomplete
type `hep_hdr'
sipcapture.c:688: error: dereferencing pointer to incomplete type sipcapture.c:712: error: dereferencing pointer to incomplete type sipcapture.c:733: error: dereferencing pointer to incomplete type sipcapture.c:736: error: dereferencing pointer to incomplete type sipcapture.c: In function `raw_capture_socket': sipcapture.c:1333: error: `IPPROTO_IPIP' undeclared (first use in this
function)
make[1]: *** [sipcapture.o] Error 1 make: *** [modules] Error 1
Cheers Jason _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev