提交 03c1d9f9 编写于 作者: B Ben Laurie

Build on FreeBSD with gcc 4.6.

上级 f889bb03
...@@ -81,6 +81,16 @@ ...@@ -81,6 +81,16 @@
#define IP_MTU 14 /* linux is lame */ #define IP_MTU 14 /* linux is lame */
#endif #endif
#ifdef __FreeBSD__
/* Standard definition causes type-punning problems. */
#undef IN6_IS_ADDR_V4MAPPED
#define s6_addr32 __u6_addr.__u6_addr32
#define IN6_IS_ADDR_V4MAPPED(a) \
(((a)->s6_addr32[0] == 0) && \
((a)->s6_addr32[1] == 0) && \
((a)->s6_addr32[2] == htonl(0x0000ffff)))
#endif
#ifdef WATT32 #ifdef WATT32
#define sock_write SockWrite /* Watt-32 uses same names */ #define sock_write SockWrite /* Watt-32 uses same names */
#define sock_read SockRead #define sock_read SockRead
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册