- 论坛徽章:
- 0
|
郁闷,我拿LZ的code交叉编译不过,愁死我了.
mipsel-linux-gcc -Wall -o darp darp.c
In file included from darp.c:9:
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/filter.h:21: error: parse error before "__u16"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/filter.h:23: error: parse error before "jf"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/filter.h:24: error: parse error before "k"
In file included from darp.c:16:
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:22: error: parse error before "__u32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:28: error: parse error before "__u32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:30: error: parse error before "nlmsg_flags"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:31: error: parse error before "nlmsg_seq"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:32: error: parse error before "nlmsg_pid"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/netlink.h:83: error: field `msg' has incomplete type
In file included from darp.c:17:
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:253: error: parse error before "__u32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:255: error: parse error before "rta_expires"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:256: error: parse error before "rta_error"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:257: error: parse error before "rta_used"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:260: error: parse error before "rta_id"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:261: error: parse error before "rta_ts"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:262: error: parse error before "rta_tsage"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:333: error: parse error before "__s32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:359: error: parse error before "__u16"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:361: error: parse error before "ndm_type"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:404: error: parse error before "__u32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:406: error: parse error before "ndm_updated"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:407: error: parse error before "ndm_refcnt"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:519: error: parse error before "__u32"
/opt/buildroot-gcc342/bin/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/sys-include/linux/rtnetlink.h:521: error: parse error before "tcm_info"
darp.c:120: error: parse error before "__be16"
darp.c: In function `gateway_on_nic':
darp.c:277: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:308: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:310: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:312: error: dereferencing pointer to incomplete type
darp.c:312: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:313: error: dereferencing pointer to incomplete type
darp.c:314: error: dereferencing pointer to incomplete type
darp.c:317: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:332: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:332: error: dereferencing pointer to incomplete type
darp.c:332: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:332: error: dereferencing pointer to incomplete type
darp.c:332: error: dereferencing pointer to incomplete type
darp.c:332: error: dereferencing pointer to incomplete type
darp.c:332: warning: left-hand operand of comma expression has no effect
darp.c:334: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:339: error: dereferencing pointer to incomplete type
darp.c:339: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:357: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c:359: error: dereferencing pointer to incomplete type
darp.c:359: error: invalid application of `sizeof' to incomplete type `nlmsghdr'
darp.c: In function `pinghost':
darp.c:402: error: elements of array `sfilter' have incomplete type
darp.c:403: warning: excess elements in struct initializer
darp.c:403: warning: (near initialization for `sfilter[0]')
darp.c:403: warning: excess elements in struct initializer
darp.c:403: warning: (near initialization for `sfilter[0]')
darp.c:403: warning: excess elements in struct initializer
darp.c:403: warning: (near initialization for `sfilter[0]')
darp.c:403: warning: excess elements in struct initializer
darp.c:403: warning: (near initialization for `sfilter[0]')
darp.c:404: warning: excess elements in struct initializer
darp.c:404: warning: (near initialization for `sfilter[1]')
darp.c:404: warning: excess elements in struct initializer
darp.c:404: warning: (near initialization for `sfilter[1]')
darp.c:404: warning: excess elements in struct initializer
darp.c:404: warning: (near initialization for `sfilter[1]')
darp.c:404: warning: excess elements in struct initializer
darp.c:404: warning: (near initialization for `sfilter[1]')
darp.c:405: warning: excess elements in struct initializer
darp.c:405: warning: (near initialization for `sfilter[2]')
darp.c:405: warning: excess elements in struct initializer
darp.c:405: warning: (near initialization for `sfilter[2]')
darp.c:405: warning: excess elements in struct initializer
darp.c:405: warning: (near initialization for `sfilter[2]')
darp.c:405: warning: excess elements in struct initializer
darp.c:405: warning: (near initialization for `sfilter[2]')
darp.c:406: warning: excess elements in struct initializer
darp.c:406: warning: (near initialization for `sfilter[3]')
darp.c:406: warning: excess elements in struct initializer
darp.c:406: warning: (near initialization for `sfilter[3]')
darp.c:406: warning: excess elements in struct initializer
darp.c:406: warning: (near initialization for `sfilter[3]')
darp.c:406: warning: excess elements in struct initializer
darp.c:406: warning: (near initialization for `sfilter[3]')
darp.c:407: warning: excess elements in struct initializer
darp.c:407: warning: (near initialization for `sfilter[4]')
darp.c:407: warning: excess elements in struct initializer
darp.c:407: warning: (near initialization for `sfilter[4]')
darp.c:407: warning: excess elements in struct initializer
darp.c:407: warning: (near initialization for `sfilter[4]')
darp.c:407: warning: excess elements in struct initializer
darp.c:407: warning: (near initialization for `sfilter[4]')
darp.c:410: warning: excess elements in struct initializer
darp.c:410: warning: (near initialization for `sfilter[5]')
darp.c:410: warning: excess elements in struct initializer
darp.c:410: warning: (near initialization for `sfilter[5]')
darp.c:410: warning: excess elements in struct initializer
darp.c:410: warning: (near initialization for `sfilter[5]')
darp.c:410: warning: excess elements in struct initializer
darp.c:410: warning: (near initialization for `sfilter[5]')
darp.c:411: warning: excess elements in struct initializer
darp.c:411: warning: (near initialization for `sfilter[6]')
darp.c:411: warning: excess elements in struct initializer
darp.c:411: warning: (near initialization for `sfilter[6]')
darp.c:411: warning: excess elements in struct initializer
darp.c:411: warning: (near initialization for `sfilter[6]')
darp.c:411: warning: excess elements in struct initializer
darp.c:411: warning: (near initialization for `sfilter[6]')
darp.c:412: warning: excess elements in struct initializer
darp.c:412: warning: (near initialization for `sfilter[7]')
darp.c:412: warning: excess elements in struct initializer
darp.c:412: warning: (near initialization for `sfilter[7]')
darp.c:412: warning: excess elements in struct initializer
darp.c:412: warning: (near initialization for `sfilter[7]')
darp.c:412: warning: excess elements in struct initializer
darp.c:412: warning: (near initialization for `sfilter[7]')
darp.c:402: error: array size missing in 'sfilter'
darp.c:402: error: storage size of 'sfilter' isn't known
darp.c:439: error: invalid application of `sizeof' to incomplete type `sock_filter'
darp.c:439: warning: division by zero
darp.c:402: warning: unused variable `sfilter'
darp.c: At top level:
darp.c:481: error: parse error before "__be16"
darp.c: In function `setup_arpmsg':
darp.c:491: error: `dsthwa' undeclared (first use in this function)
darp.c:491: error: (Each undeclared identifier is reported only once
darp.c:491: error: for each function it appears in.)
darp.c:492: error: `arpmsg' undeclared (first use in this function)
darp.c:496: error: `srchwa' undeclared (first use in this function)
darp.c:500: error: `ha_type' undeclared (first use in this function)
darp.c:504: error: `op' undeclared (first use in this function)
darp.c:506: error: `sha' undeclared (first use in this function)
darp.c:507: error: `spa' undeclared (first use in this function)
darp.c:509: error: `tha' undeclared (first use in this function)
darp.c:514: error: `tpa' undeclared (first use in this function)
make: *** [default] Error 1 |
|