mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
NM: Fix sample/http-server ipv6 fixes
Fix 1: Use #include "../xyz" rather than #include <../xyz> Fix 2: util-internal.h includes ipv6-internal.h, which in turn defines a replacement AF_INET6 on platforms that don't have it. As such, the AF_INET6 checks shouldn't be needed. (right?)
This commit is contained in:
parent
bbf55150b6
commit
eb692be9c8
@ -41,7 +41,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <../util-internal.h>
|
||||
#include "../util-internal.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define stat _stat
|
||||
@ -371,11 +371,9 @@ main(int argc, char **argv)
|
||||
if (ss.ss_family == AF_INET) {
|
||||
got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
|
||||
inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
|
||||
#ifdef AF_INET6
|
||||
} else if (ss.ss_family == AF_INET6) {
|
||||
got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
|
||||
inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
|
||||
#endif
|
||||
} else {
|
||||
fprintf(stderr, "Weird address family %d\n",
|
||||
ss.ss_family);
|
||||
|
Loading…
x
Reference in New Issue
Block a user