On 27/11/12 23:39, Bruce Evans wrote:
#include <netinet/in.h>
INADDR_ANY;
The above results in 'u_int32_t undefined' error, which it shouldn't
according to POSIX.
<netinet/in.h> is careful to only declare uint32_t, but then it is
broken and uses u_int32_t for INADDR_ANY and INADDR_BROADCAST.
u_int32_t is also misused extensively in the definitions of INADDR_*
and IN_* under __BSD_VISIBLE. INADDR_ANY is broken even if __BSD_VISIBLE
is nonzero (the default), because the u_int32_t pollution is not
automatically supplied with __BSD_VISIBLE. It takes including
<sys/types.h> (with __BSD_VISIBLE) to get it.
Yes. I figured out that including <sys/types.h> solves the problem. I
was just pointing out the bug.
If there's interest I can send a patch for INADDR_ANY and INADDR_BROADCAST.
Martin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"