mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
align macros for sun
This commit is contained in:
parent
835c1e4786
commit
2ec48bbca3
1 changed files with 16 additions and 0 deletions
|
@ -6,6 +6,22 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef CMSG_ALIGN
|
||||
# ifdef __sun__
|
||||
# define CMSG_ALIGN _CMSG_DATA_ALIGN
|
||||
# else
|
||||
# define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CMSG_SPACE
|
||||
# define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+CMSG_ALIGN(len))
|
||||
#endif
|
||||
|
||||
#ifndef CMSG_LEN
|
||||
# define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+(len))
|
||||
#endif
|
||||
|
||||
int
|
||||
sendfd(int s, int fd)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue