cygwin下构建配置了ipv6的busybox
2009-06-16 10:44
375 查看
cygwin本身是不支持ipv6的,在cygwin的socket.h和in.h里可以看到ipv6相关的部分都被注释掉了,网上到是有ipv6的补丁,不过有评论说该补丁对非ipv6的环境有影响,所以也不能使用
分析busybox,它是在构建过程中生成applet_tables.exe时报的错,applet_tables.exe在构建过程中被调用,生成include/applet_tables.h,注册busybox配置了的命令及实现,也不可能跳过。
可以做如下修改:
修改 cygwin/usr/include/cygwin/socket.h
将下面的块
#if 0 /* Not yet */
#define AF_INET6 23 /* IP version 6 */
#endif
改为:
#ifdef ENABLE_FEATURE_IPV6
#define AF_INET6 23 /* IP version 6 */
#endif
修改 cygwin/usr/include/cygwin/in.h
将下面的块
#ifdef USE_IPV6
/* IPv6 definitions as we start to include them. This is just
a beginning dont get excited 8) */
struct in6_addr
{
uint8_t s6_addr[16];
};
struct sockaddr_in6
{
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number. */
uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
struct in6_addr sin6_addr; /* IPv6 address. */
uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
};
#endif
改为:
#if defined(USE_IPV6) || defined(ENABLE_FEATURE_IPV6)
/* IPv6 definitions as we start to include them. This is just
a beginning dont get excited 8) */
struct in6_addr
{
uint8_t s6_addr[16];
};
struct sockaddr_in6
{
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number. */
uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
struct in6_addr sin6_addr; /* IPv6 address. */
uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
};
#endif
分析busybox,它是在构建过程中生成applet_tables.exe时报的错,applet_tables.exe在构建过程中被调用,生成include/applet_tables.h,注册busybox配置了的命令及实现,也不可能跳过。
可以做如下修改:
修改 cygwin/usr/include/cygwin/socket.h
将下面的块
#if 0 /* Not yet */
#define AF_INET6 23 /* IP version 6 */
#endif
改为:
#ifdef ENABLE_FEATURE_IPV6
#define AF_INET6 23 /* IP version 6 */
#endif
修改 cygwin/usr/include/cygwin/in.h
将下面的块
#ifdef USE_IPV6
/* IPv6 definitions as we start to include them. This is just
a beginning dont get excited 8) */
struct in6_addr
{
uint8_t s6_addr[16];
};
struct sockaddr_in6
{
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number. */
uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
struct in6_addr sin6_addr; /* IPv6 address. */
uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
};
#endif
改为:
#if defined(USE_IPV6) || defined(ENABLE_FEATURE_IPV6)
/* IPv6 definitions as we start to include them. This is just
a beginning dont get excited 8) */
struct in6_addr
{
uint8_t s6_addr[16];
};
struct sockaddr_in6
{
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* Port number. */
uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
struct in6_addr sin6_addr; /* IPv6 address. */
uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
};
#endif
相关文章推荐
- 制作文件系统之五:基于BusyBox的默认配置来构建文件系统
- 配置cygwin构建hadoop环境
- Busybox 配置、编译与文件系统构建
- NDK与Cygwin配置
- android-gradle-深入浅出四:自定义构建过程之配置manifest
- 实际maven 构建web项目后 各个配置
- 【项目管理和构建】十分钟教程,eclipse配置maven + 创建maven项目(二)
- IPv6 的简单配置
- Android新版NDK环境配置(免Cygwin)
- Android Studio配置三 gradle项目构建
- 写一份gulp常用配置文件,构建前端工作流
- 构建AIX环境下的RAC之--配置内核参数(3)
- centos 6.x 初始化配置,静态IP配置,IPV6禁止等
- Redhat7 配置ipv6
- maven 构建spring ssh mybatis 配置
- Eclipse+CDT+Cygwin配置C/C++开发环境
- webpack构建vue项目(再谈配置)
- cygwin安装,NDK配置,samples下demo调试,以及手写测试程序
- busybox配置telnetd
- 企业级Spring Cloud构建微服务架构:分布式配置中心