HustLion / ruijieclient

Automatically exported from code.google.com/p/ruijieclient
GNU Lesser General Public License v3.0
0 stars 0 forks source link

在openWRT交叉编译时出现错误 #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
mips-openwrt-linux-gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -g0 -MT md5.o -MD 
-MP -MF .deps/md5.Tpo -c -o md5.o md5.c
mv -f .deps/md5.Tpo .deps/md5.Po
mips-openwrt-linux-gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -g0 -MT 
packetsender.o -MD -MP -MF .deps/packetsender.Tpo -c -o packetsender.o 
packetsender.c
packetsender.c: In function 'pkt_get_param':
packetsender.c:249: error: 'SOCK_CLOEXEC' undeclared (first use in this 
function)
packetsender.c:249: error: (Each undeclared identifier is reported only once
packetsender.c:249: error: for each function it appears in.)

在ubuntu下为ubuntu编译就没问题,但是为openWRT交叉编译就会报SOC
K_CLOEXEC undeclared,不知道原因...请高手指导

Original issue reported on code.google.com by zhg...@gmail.com on 21 Dec 2010 at 2:27

GoogleCodeExporter commented 9 years ago
packetsender.c 249行为  int sock = socket(AF_INET,SOCK_DGRAM|SOCK_CLOEXEC,0);
去掉SOCK_CLOEXEC后编译通过,用man socket查了下SOCK_CLOEXEC为linux 
2.6.27以后支持的,但是openwrt的内核为2.6.35,不应该不支持呀�
��。。奇怪

Original comment by zhg...@gmail.com on 21 Dec 2010 at 6:40

GoogleCodeExporter commented 9 years ago
是  glibc 的版本太低了吧

Original comment by microcai...@gmail.com on 27 Jan 2011 at 12:42