-
Notifications
You must be signed in to change notification settings - Fork 427
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
Build failure with musl libc #359
Comments
The change isn't too large, I've been using the attached. |
ffontaine
added a commit
to ffontaine/open-vm-tools
that referenced
this issue
Oct 31, 2019
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 <fontaine.fabrice@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
musl libc redirects include of
sys/poll.h
topoll.h
. But sincepoll.h
is also a local header file, the musl libc header is never included. This leads to the following build failure:I noticed that Android had a similar issue witch is fixed in local
poll.h
with the following code:This fix doesn't work for musl because the is intentionally no macro that identifies musl libc.
The only reasonable way to fix the issue for both platforms is to rename the local
poll.h
. But this is a big change I guess.The text was updated successfully, but these errors were encountered: