Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename poll.h into vm_poll.h to fix build failure on musl #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 31, 2019

  1. Rename poll.h into vm_poll.h to fix build failure on musl

    musl libc redirects include of sys/poll.h to poll.h. But since poll.h is
    also a local header file, the musl libc header is never included. This
    leads to the following build failure:
    
    In file included from asyncsocket.c:73:0:
    .../host/i586-buildroot-linux-musl/sysroot/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
     #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
    asyncsocket.c: In function ‘AsyncTCPSocketPollWork’:
    asyncsocket.c:2537:13: error: invalid use of undefined type ‘struct pollfd’
              pfd[i].fd = asock[i]->fd;
                 ^
    asyncsocket.c:2537:13: error: dereferencing pointer to incomplete type ‘struct pollfd’
    asyncsocket.c:2538:13: error: invalid use of undefined type ‘struct pollfd’
              pfd[i].events = read ? POLLIN : POLLOUT;
                 ^
    asyncsocket.c:2538:33: error: ‘POLLIN’ undeclared (first use in this function); did you mean ‘POLL_IN’?
              pfd[i].events = read ? POLLIN : POLLOUT;
    
    So rename poll.h into vm_poll.h as suggested by srowe in
    vmware#359 (comment)
    
    Fixes:
     - http://autobuild.buildroot.org/results/4f575ef42bbc4387a07e396205052b2da081c64d
    
    Fix vmware#359
    
    Signed-off-by: Fabrice Fontaine <[email protected]>
    ffontaine committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    821c794 View commit details
    Browse the repository at this point in the history