-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix build using musl libc #344
Conversation
Thanks for the pull request. In most (all?) places where we including <stdint.h> we do this conditionally like this:
Do you think your change would work if the #include was done this way? Perhaps I'm being pedantic but everyplace else we make sure that GNU autoconf actually found that header file before trying to include it. If you're not sure, you can search for STDINT in the file
|
From Header Portability - Autoconf:
From Solaris Porting FAQ
@bkuhls Any plans for an updated PR? |
This PR is also not enough to fix compilation with musl. In addition, _GNU_SOURCE needs to be globally defined so that musl exposes struct tcp_info in <netinet/tcp.h>, which is used in iperf.h. (Defining _GNU_SOURCE just in iperf.h is not enough because <netinet/tcp.h> is included in iperf_server_api.c before iperf.h.) See http://patchwork.ozlabs.org/patch/572187/raw/ for the patch actually used in buildroot. |
* Include stdint.h in files where its types are used Signed-off-by: Moritz Kick <[email protected]> * Fix type of len parameter passed to getsockopt getsockopt expects socklen_t instead of int as its fifth argument Signed-off-by: Moritz Kick <[email protected]> * Remove unnecassary includes of netinet/tcp.h also cleanup the second include of stdint.h in main.c This commit fixes #331 and is a replacement for #344. Signed-off-by: Moritz Kick <[email protected]>
This pull request has been replaced by #518...thanks for the submission. |
* Include stdint.h in files where its types are used Signed-off-by: Moritz Kick <[email protected]> * Fix type of len parameter passed to getsockopt getsockopt expects socklen_t instead of int as its fifth argument Signed-off-by: Moritz Kick <[email protected]> * Remove unnecassary includes of netinet/tcp.h also cleanup the second include of stdint.h in main.c This commit fixes #331 and is a replacement for #344. Signed-off-by: Moritz Kick <[email protected]> (cherry picked from commit a8ee9c6)
Fixes #331