Message ID | CAFULd4bzCRgnnWfF4bvaone-BqN_QVAixjYYFOj1N4kCZeAGTg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Jul 23, 2013 at 6:50 AM, Uros Bizjak <ubizjak@gmail.com> wrote: >> >> Another problem was triggered on CentOS 5.9, where compile fails with: >> >> ../../../gcc-svn/trunk/libgo/runtime/netpoll_epoll.c: In function >> ‘runtime_epollcreate1’: >> ../../../gcc-svn/trunk/libgo/runtime/netpoll_epoll.c:41:2: error: >> implicit declaration of function ‘epoll_create1’ >> [-Werror=implicit-function-declaration] >> r = epoll_create1(flags); >> ^ >> cc1: all warnings being treated as errors >> gmake[4]: *** [netpoll_epoll.lo] Error 1 >> gmake[4]: *** Waiting for unfinished jobs.... >> >> CentOS has glibc 2.5 and epoll_create1 is not supported. > > Attached patch fixes this problem by providing prototype, missing from > sys/poll.h in netpoll_epoll.c. > > Patch was tested on x86_64-pc-linux-gnu {,-m32} on CentOS 5.9 and Fedora 19. Thanks! Committed to mainline and 4.8 branch. Ian
Index: runtime/netpoll_epoll.c =================================================================== --- runtime/netpoll_epoll.c (revision 201156) +++ runtime/netpoll_epoll.c (working copy) @@ -20,6 +20,10 @@ #define EPOLL_CLOEXEC 02000000 #endif +#ifndef HAVE_EPOLL_CREATE1 +extern int epoll_create1 (int __flags); +#endif + typedef struct epoll_event EpollEvent; static int32