-
Notifications
You must be signed in to change notification settings - Fork 292
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
Added missing includes: <netinet/in.h> and <sys/socket.h> #473
Conversation
This breaks windows: https://travis-ci.org/TokTok/c-toxcore/jobs/201035192#L1512 |
Try to remove all this includes and add them into network.h with freebsd ifdef |
0cc2498
to
f340d0c
Compare
I moved them into natwork.h |
@yurivict Do we really need to include it directly on linux? If you think so, feel free to replace on UNIX ifdef (but not drop) |
0d96a95
to
0e73f9d
Compare
I updated the patch.
On all UNIXes basic network includes should be the same. It's better to keep them in one place - network.h. Before on Linux some of them were included through some other includes despite manpages saying they should be included. |
@yurivict In real, this includes should be in Reviewed 3 of 3 files at r1. Comments from Reviewable |
Can confirm, toxcore doesn't build on FreeBSD 11.0 and this PR fixes the issue. FreeBSD doesn't have #ifndef IPV6_ADD_MEMBERSHIP
#ifdef IPV6_JOIN_GROUP
#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
#endif
#endif The issue is that You also need to include |
@Diadlo do you think we can merge this PR now or we still need to wait for the network refactor? It looks like there is still work to be done in network refactoring since this is an issue
Ideally |
@nurupo I'm currently working on replacing AF_INET on platform independent TOX_AF_INET. It will be in the next network refactoring PR. So you can merge this PR (in my opinion) |
Then you'd need to refactoring this merge in that next refactoring PR. |
Yes, but currently we haven't base for the writing right platform-independent code |
@yurivict can you rebase on master, and also enable the checkbox that lets collaborators push to the PR branch. |
I rebased and enabled the checkbox. |
In 0.1.7 netinet/in.h is still missing in toxcore/network.c
|
|
Found these missing includes while compiling on FreeBSD 11.
9ca2a6d
to
f751fcf
Compare
v0.1.11 is still unbuildable on FreeBSD:
|
Why are you trying to build the incomplete Haskell testing framework |
v0.1.11 builds fine on FreeBSD, we have a Travis CI check for that. It doesn't build everything under the sun though, just the actual library and autotests for it, not |
You're right: removing testing/hstox does it. |
Oh, I'm sorry, I thought |
Yes, I patched CMakeLists.txt to remove it. |
Yeah, we should probably make it build on FreeBSD given how it's enabled by default, or disable it by default and hide under a build flag. @robinlinden @iphydf |
@thierry-FreeBSD hstox should compile on FreeBSD when #648 is merged. |
Found these missing includes while compiling on FreeBSD 11.
This change is