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

POSIX includes portability #4019

Merged
merged 1 commit into from Jul 17, 2016
Merged

POSIX includes portability #4019

merged 1 commit into from Jul 17, 2016

Conversation

bentley
Copy link
Contributor

@bentley bentley commented Jul 17, 2016

POSIX specifies that inet_ntoa() is declared in arpa/inet.h, and that
POLLRDNORM, etc. are defined in poll.h.

gethostbyname() is not specified by POSIX, but the manpages in OpenBSD,
FreeBSD, OS X, and glibc all state that it is declared in netdb.h.

Without these headers, the build fails on OpenBSD and possibly other
POSIX-conforming systems.


This change is Reviewable

@JosJuice
Copy link
Member

Please replace the commit with one that uses the include order that clang-format enforces:

https://buildbot.dolphin-emu.org/builders/lint/builds/2002/steps/shell/logs/stdio

@@ -6,6 +6,7 @@
#ifndef _WIN32
#include <unistd.h>
#endif
#include <arpa/inet.h>

This comment was marked as off-topic.

POSIX specifies that inet_ntoa() is declared in arpa/inet.h, and that
POLLRDNORM, etc. are defined in poll.h.

gethostbyname() is not specified by POSIX, but the manpages in OpenBSD,
FreeBSD, OS X, and glibc all state that it is declared in netdb.h.

Without these headers, the build fails on OpenBSD and possibly other
systems.
@bentley
Copy link
Contributor Author

bentley commented Jul 17, 2016

Updated to wrap these headers in #ifndef _WIN32.

@Fallcrest Fallcrest mentioned this pull request Jul 17, 2016
@Parlane
Copy link
Member

Parlane commented Jul 17, 2016

Reviewed 2 of 2 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@Parlane Parlane merged commit b9246cf into dolphin-emu:master Jul 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants