Vroting / ruijieclient

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

建议,可否写个MAC OS版本! #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
今天编译了下0.8.2的版本,发现许多都没定义比如出现
sendpacket.h:103: error: ‘ETH_HLEN’ undeclared here (not in a function)
等等,希望各位考虑一下。谢谢~

我可以代为编译,如果没有MAC OS X系统和Xcode tool 3.13不好下。

Original issue reported on code.google.com by hfgongd...@163.com on 2 Dec 2009 at 5:02

GoogleCodeExporter commented 8 years ago

Original comment by sthots on 3 Dec 2009 at 9:50

GoogleCodeExporter commented 8 years ago
..... 问题 ... 请帮帮忙修改吧,改好了提交个 patch 
谢谢了

Original comment by microcai...@gmail.com on 3 Dec 2009 at 4:47

GoogleCodeExporter commented 8 years ago
好的我加入定义再编译看看,谢谢你的回复~

Original comment by hfgongd...@163.com on 4 Dec 2009 at 1:28

GoogleCodeExporter commented 8 years ago
先声明下:我是学机械的,对这个比较感兴趣而已,不怎会��
�见谅!
加了'ETH_ALEN'定义后编译过程贴下
xshowss-mac-pro:~ xshows$ cd /Users/xshows/Desktop/ruijieclient-0.8.2 
xshowss-mac-pro:ruijieclient-0.8.2 xshows$  sudo ./configure
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... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
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 for a BSD-compatible install... /usr/bin/install -c
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 for pid_t... yes
checking for size_t... yes
checking for uint8_t... yes
checking whether byte ordering is bigendian... no
checking for memset... yes
checking for strerror... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking linux/rtnetlink.h usability... no
checking linux/rtnetlink.h presence... no
checking for linux/rtnetlink.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) 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 net/ethernet.h usability... yes
checking net/ethernet.h presence... yes
checking for net/ethernet.h... yes
checking for main in -lpcap... yes
./configure: line 5237: 0=0: command not found
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for main in -lxml2... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
xshowss-mac-pro:ruijieclient-0.8.2 xshows$ sudo make
make  all-recursive
Making all in src
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-blog.o -MD -MP -MF .deps/ruijieclient-blog.Tpo -c -o
ruijieclient-blog.o `test -f 'blog.c' || echo './'`blog.c
mv -f .deps/ruijieclient-blog.Tpo .deps/ruijieclient-blog.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-myerr.o -MD -MP -MF .deps/ruijieclient-myerr.Tpo -c -o
ruijieclient-myerr.o `test -f 'myerr.c' || echo './'`myerr.c
mv -f .deps/ruijieclient-myerr.Tpo .deps/ruijieclient-myerr.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-codeconv.o -MD -MP -MF .deps/ruijieclient-codeconv.Tpo -c -o
ruijieclient-codeconv.o `test -f 'codeconv.c' || echo './'`codeconv.c
mv -f .deps/ruijieclient-codeconv.Tpo .deps/ruijieclient-codeconv.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-ruijieclient.o -MD -MP -MF .deps/ruijieclient-ruijieclient.Tpo 
-c -o
ruijieclient-ruijieclient.o `test -f 'ruijieclient.c' || echo 
'./'`ruijieclient.c
ruijieclient.c: In function 'main':
ruijieclient.c:294: warning: 'daemon' is deprecated (declared at
/usr/include/stdlib.h:283)
mv -f .deps/ruijieclient-ruijieclient.Tpo .deps/ruijieclient-ruijieclient.Po
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-sendpacket.o -MD -MP -MF .deps/ruijieclient-sendpacket.Tpo -c 
-o
ruijieclient-sendpacket.o `test -f 'sendpacket.c' || echo './'`sendpacket.c
sendpacket.c: In function 'GetNicParam':
sendpacket.c:346: error: dereferencing pointer to incomplete type
sendpacket.c:346: error: dereferencing pointer to incomplete type
sendpacket.c: In function 'SendFindServerPacket':
sendpacket.c:419: error: 'ETH_ALEN' undeclared (first use in this function)
sendpacket.c:419: error: (Each undeclared identifier is reported only once
sendpacket.c:419: error: for each function it appears in.)
make[2]: *** [ruijieclient-sendpacket.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
xshowss-mac-pro:ruijieclient-0.8.2 xshows$ sudo make install
Making install in src
gcc -DHAVE_CONFIG_H -I. -I..    -I /usr/include/libxml2 -g -O2 -DUSE_DYLIB  -g0 
-Os
-MT ruijieclient-sendpacket.o -MD -MP -MF .deps/ruijieclient-sendpacket.Tpo -c 
-o
ruijieclient-sendpacket.o `test -f 'sendpacket.c' || echo './'`sendpacket.c
sendpacket.c: In function 'GetNicParam':
sendpacket.c:346: error: dereferencing pointer to incomplete type
sendpacket.c:346: error: dereferencing pointer to incomplete type
sendpacket.c: In function 'SendFindServerPacket':
sendpacket.c:419: error: 'ETH_ALEN' undeclared (first use in this function)
sendpacket.c:419: error: (Each undeclared identifier is reported only once
sendpacket.c:419: error: for each function it appears in.)
make[1]: *** [ruijieclient-sendpacket.o] Error 1
make: *** [install-recursive] Error 1
xshowss-mac-pro:ruijieclient-0.8.2 xshows$ 

Original comment by hfgongd...@163.com on 4 Dec 2009 at 1:44

GoogleCodeExporter commented 8 years ago
加入
#define ETH_ALEN    6       /* Octets in one ethernet addr   */
#define ETH_HLEN    14      /* Total octets in header.   */
#define ETH_ZLEN    60      /* Min. octets in frame sans FCS */
#define ETH_DATA_LEN    1500        /* Max. octets in payload    */
#define ETH_FRAME_LEN   1514        /* Max. octets in frame sans FCS */
#define ETH_FCS_LEN 4       /* Octets in the FCS         */
后

sendpacket.c: In function 'GetNicParam':
sendpacket.c:346: error: dereferencing pointer to incomplete type
sendpacket.c:346: error: dereferencing pointer to incomplete type
make[2]: *** [ruijieclient-sendpacket.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Original comment by hfgongd...@163.com on 4 Dec 2009 at 1:55