diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-05-25 15:30:17 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-05-25 17:47:23 +0200 |
| commit | 7b147cb0c1eaa728f244cc8390ccfcc3f4aee03a (patch) | |
| tree | 80e23538c1d8b364ec9c8c7e58e895b9a471dfef /src/common.h | |
| parent | Fix errors and warnings and make the code cleaner (diff) | |
| download | blind-7b147cb0c1eaa728f244cc8390ccfcc3f4aee03a.tar.gz blind-7b147cb0c1eaa728f244cc8390ccfcc3f4aee03a.tar.bz2 blind-7b147cb0c1eaa728f244cc8390ccfcc3f4aee03a.tar.xz | |
Add blind-from-named and blind-to-named
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | src/common.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 3a746f8..3e3f966 100644 --- a/src/common.h +++ b/src/common.h @@ -20,7 +20,13 @@ # include <sys/epoll.h> #endif #include <sys/mman.h> +#if defined(HAVE_SENDFILE) +# include <sys/sendfile.h> +#endif #include <sys/stat.h> +#include <sys/socket.h> +#include <sys/uio.h> +#include <sys/un.h> #include <sys/wait.h> #include <alloca.h> #include <ctype.h> @@ -35,3 +41,19 @@ #include <string.h> #include <strings.h> #include <unistd.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 |
