|
Lines 93-96
Link Here
|
| 93 |
pid_t tcgetpgrp(int); |
93 |
pid_t tcgetpgrp(int); |
| 94 |
#endif /* HAVE_TCGETPGRP */ |
94 |
#endif /* HAVE_TCGETPGRP */ |
| 95 |
|
95 |
|
|
|
96 |
#ifndef CMSG_DATA |
| 97 |
/* given pointer to struct cmsghdr, return pointer to data */ |
| 98 |
# define MY_ALIGN(p) (((u_int)(p) + (sizeof(int) - 1)) &~ (sizeof(int) - 1)) |
| 99 |
# define CMSG_DATA(cmsg) \ |
| 100 |
((u_char *)(cmsg) + MY_ALIGN(sizeof(struct cmsghdr))) |
| 101 |
#endif /* CMSG_DATA */ |
| 102 |
|
| 103 |
#ifndef CMSG_FIRSTHDR |
| 104 |
/* |
| 105 |
* RFC 2292 requires to check msg_controllen, in case that the kernel returns |
| 106 |
* an empty list for some reasons. |
| 107 |
*/ |
| 108 |
# define CMSG_FIRSTHDR(mhdr) \ |
| 109 |
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ |
| 110 |
(struct cmsghdr *)(mhdr)->msg_control : \ |
| 111 |
(struct cmsghdr *)NULL) |
| 112 |
#endif /* CMSG_FIRSTHDR */ |
| 113 |
|
| 96 |
#endif /* _BSD_MISC_H */ |
114 |
#endif /* _BSD_MISC_H */ |