# HG changeset patch # User asl # Date 1189528673 0 # Node ID e71eca63cb8bff47d7c2d24337c82a9ac28fbbb9 # Parent 44054a00fecab28efb96db40e63a7e22f66cd8c3 * include/sys/socketvar.h: Fix very old and subtle macro bug. From FreeBSD revision 1.141.2.3 (RELENG_6 branch): "correctly return an error if M_NOWAIT is passed to sblock() and the operation might block." diff --git a/packages/net/bsd_tcpip/current/ChangeLog b/packages/net/bsd_tcpip/current/ChangeLog --- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,10 @@ +2007-09-11 Daniel Néri + + * include/sys/socketvar.h: Fix very old and subtle macro bug. From + FreeBSD revision 1.141.2.3 (RELENG_6 branch): "correctly return an + error if M_NOWAIT is passed to sblock() and the operation might + block." + 2007-07-08 Alexander Aganichev * include/sys/param.h (log_): Really disable logging when diff --git a/packages/net/bsd_tcpip/current/include/sys/bsdtypes.h b/packages/net/bsd_tcpip/current/include/sys/bsdtypes.h --- a/packages/net/bsd_tcpip/current/include/sys/bsdtypes.h +++ b/packages/net/bsd_tcpip/current/include/sys/bsdtypes.h @@ -29,6 +29,10 @@ #undef uint8_t #undef uint16_t #undef uint32_t +#undef int8_t +#undef int16_t +#undef int32_t + typedef __signed char int8_t; typedef unsigned char u_int8_t; typedef unsigned char uint8_t; diff --git a/packages/net/bsd_tcpip/current/include/sys/socketvar.h b/packages/net/bsd_tcpip/current/include/sys/socketvar.h --- a/packages/net/bsd_tcpip/current/include/sys/socketvar.h +++ b/packages/net/bsd_tcpip/current/include/sys/socketvar.h @@ -253,7 +253,7 @@ struct xsocket { */ #define sblock(sb, wf) ((sb)->sb_flags & SB_LOCK ? \ (((wf) == M_WAITOK) ? sb_lock(sb) : EWOULDBLOCK) : \ - ((sb)->sb_flags |= SB_LOCK), 0) + ((sb)->sb_flags |= SB_LOCK, 0)) /* release lock on sockbuf sb */ #define sbunlock(sb) { \