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:
Anthony J. Bentley 2023-05-24 01:25:16 -06:00 committed by Kelson
parent 58890a3f97
commit df164aefe5
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@
#include "internalServer.h"
#ifdef __FreeBSD__
#ifndef _WIN32
#include <netinet/in.h>
#endif