目标: 对pure FTP Server 1.0.21的makefile进行更改,使之能在arm9下运行
在修改Makefile后,重新make时出现如下错误:
structure has no member named `ss_family'
这个错误在实验指导书上并未提及。
在googl上搜索时,发现有一篇Re: Testing wu-ftpd 2.7.0 and IPv6. Odd protocol error的文章。
地址如下:http://www.landfield.com/wu-ftpd/mail-archive/wuftpd-dev/2001/Aug/0001.html
上面写到:
ftpd.c:1093: structure has no member named `ss_family'
This message is because the Linux sockaddr_storage struct member is called __ss_family not ss_family, if using configure add "#define HAVE__SS_FAMILY" to the generated src/config.h (before the Socket macros), then run make.
意思是这个错误是由于将 __ss_family误写成ss_family造成的(完全是我自己的理解,不知道对错)。只需要在config.h文件中加入:
#define HAVE__SS_FAMILY
然后再次运行configure就可以了。
我嫌麻烦,不想再运行一次configure。所以没有尝试上面的方法,所以也不知道对错。既然ss_family要表达的就是__ss_family的含义,那么我采取的措施是在头文件里添加
#define ss_family __ss_family。
再次运行make,发现一样可以调试通过。