diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-18 14:38:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-18 14:38:29 +0000 |
commit | 812ba636c7b12f2c503e34aaf9e2da50d5777b82 (patch) | |
tree | c81659977f9a532c5d4b53872301ba5e67c4166f /libgo/sysinfo.c | |
parent | f5de494c59532fdad30097af4185b2ce74700984 (diff) |
runtime: copy netpoll code from Go 1.7 runtime
Reviewed-on: https://go-review.googlesource.com/31325
From-SVN: r241307
Diffstat (limited to 'libgo/sysinfo.c')
-rw-r--r-- | libgo/sysinfo.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c index 09c0f496a6e..56790c60415 100644 --- a/libgo/sysinfo.c +++ b/libgo/sysinfo.c @@ -9,6 +9,7 @@ #include "config.h" +#include <stddef.h> #include <sys/types.h> #include <dirent.h> #include <errno.h> @@ -49,6 +50,9 @@ #if defined(HAVE_SYS_EPOLL_H) #include <sys/epoll.h> #endif +#if defined(HAVE_SYS_EVENT_H) +#include <sys/event.h> +#endif #if defined(HAVE_SYS_FILE_H) #include <sys/file.h> #endif @@ -155,6 +159,9 @@ #if defined(HAVE_SEMAPHORE_H) #include <semaphore.h> #endif +#if defined(HAVE_PORT_H) +#include <port.h> +#endif /* Constants that may only be defined as expressions on some systems, expressions too complex for -fdump-go-spec to handle. These are @@ -260,3 +267,9 @@ enum { NLA_HDRLEN_val = NLA_HDRLEN, #endif }; + +#if defined(HAVE_SYS_EPOLL_H) +enum { + epoll_data_offset = offsetof(struct epoll_event, data) +}; +#endif |