Since NULL isn't necessarily available, change CMSG_*() to use the

integer constant expression directly instead.

Fixes a problem in the build of rxvt-unicode-7.2, as reported by
Thomas Klausner.
This commit is contained in:
kleink 2006-01-28 13:20:18 +00:00
parent 438f912c45
commit 39963806e0
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: socket.h,v 1.77 2005/11/29 03:12:16 christos Exp $ */
/* $NetBSD: socket.h,v 1.78 2006/01/28 13:20:18 kleink Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -497,7 +497,7 @@ struct cmsghdr {
(((__caddr_t)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \
__CMSG_ALIGN(sizeof(struct cmsghdr)) > \
(((__caddr_t)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \
(struct cmsghdr *)NULL : \
(struct cmsghdr *)0 : \
(struct cmsghdr *)((__caddr_t)(cmsg) + \
__CMSG_ALIGN((cmsg)->cmsg_len)))
@ -508,7 +508,7 @@ struct cmsghdr {
#define CMSG_FIRSTHDR(mhdr) \
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
(struct cmsghdr *)(mhdr)->msg_control : \
(struct cmsghdr *)NULL)
(struct cmsghdr *)0)
#define CMSG_SPACE(l) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l))
#define CMSG_LEN(l) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (l))