mirror of https://github.com/kiwix/libkiwix.git
Include netinet/in.h everywhere except Windows
According to POSIX, sockaddr_in is declared in netinet/in.h. Some POSIX systems (notably OpenBSD and FreeBSD) declare it in only this header, so including it is required. Others, like Linux, are are more lax in exposing symbols to the namespace, providing sockaddr_in via additional headers, but it does no harm to include the standard header on such systems.
This commit is contained in:
parent
58890a3f97
commit
df164aefe5
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "internalServer.h"
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifndef _WIN32
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue