mailitias / mentohust

Automatically exported from code.google.com/p/mentohust
0 stars 0 forks source link

在freebsd7上不能编译 #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
在freebsd7/8上编译均出现错误,学校支持xrgsu和V2认证

Script started on Thu Mar  4 13:15:32 2010
[XXX@freebsd ~/mentohust-0.3.1]$ ./configure
checking build system type... i386-unknown-freebsd7.2
checking host system type... i386-unknown-freebsd7.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for dlsym in -ldl... no
checking for dlsym in -ldl... (cached) no
checking iconv.h usability... no
checking iconv.h presence... no
checking for iconv.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for atexit... yes
checking for memmove... yes
checking for memset... yes
checking for socket... yes
checking for strrchr... yes
config result: host(freebsd7.2) pcap(dyload) notify(yes) encode(yes) arp(yes)
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[xxx@freebsd ~/mentohust-0.3.1]$ gmake
gmake  all-recursive
gmake[1]: Entering directory `/usr/home/r/e/mentohust-0.3.1'
Making all in src
gmake[2]: Entering directory `/usr/home/r/e/mentohust-0.3.1/src'
gcc -DHAVE_CONFIG_H -I. -I..     -Os -Wall -MT myfunc.o -MD -MP -MF
.deps/myfunc.Tpo -c -o myfunc.o myfunc.c
In file included from myfunc.c:8:
myfunc.h:15: error: expected ')' before 'ip'
myfunc.c: In function 'getAddress':
myfunc.c:176: warning: type-punning to incomplete type might break
strict-aliasing rules
myfunc.c:176: error: dereferencing pointer to incomplete type
myfunc.c:195: warning: type-punning to incomplete type might break
strict-aliasing rules
myfunc.c:195: error: dereferencing pointer to incomplete type
myfunc.c: In function 'isOnline':
myfunc.c:488: error: storage size of 'dest' isn't known
myfunc.c:494: error: 'IPPROTO_ICMP' undeclared (first use in this function)
myfunc.c:494: error: (Each undeclared identifier is reported only once
myfunc.c:494: error: for each function it appears in.)
myfunc.c:488: warning: unused variable 'dest'
gmake[2]: *** [myfunc.o] Error 1
gmake[2]: Leaving directory `/usr/home/r/e/mentohust-0.3.1/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/r/e/mentohust-0.3.1'
gmake: *** [all] Error 2

Original issue reported on code.google.com by lijian1...@gmail.com on 4 Mar 2010 at 5:24

GoogleCodeExporter commented 9 years ago
QQ858387065联系

Original comment by HUSTPub...@gmail.com on 4 Mar 2010 at 5:57

GoogleCodeExporter commented 9 years ago
没有FreeBSD,自己改源码吧。

Original comment by www.eh...@gmail.com on 6 Mar 2010 at 11:32

GoogleCodeExporter commented 9 years ago
解决了,(1)myfunc.h 中u_int32_t 
缺少定义,添加头文件<sys/types.h>或直接定义 typedef
__uint32_t u_int32_t;
(2) myfunc.c 中缺少头文件 <netinet/in.h>
谢谢大家的帮忙解决。

Original comment by lijian1...@gmail.com on 9 Mar 2010 at 7:47

GoogleCodeExporter commented 9 years ago

Original comment by www.eh...@gmail.com on 13 May 2010 at 3:48