Commit 67cebc81 authored by jan.koester's avatar jan.koester
Browse files

Fix FreeBSD build: include <sys/socket.h> for AF_INET/AF_INET6

On FreeBSD <arpa/inet.h> does not pull in the AF_* constants, so
serverconfig.cpp (and editorconfig.cpp, same pattern) failed with
'use of undeclared identifier AF_INET'. Include sys/types.h,
sys/socket.h and netinet/in.h explicitly.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 4c2d94ac
Loading
Loading
Loading
Loading
+3 −0
Changes for editor/src/editorconfig.cpp: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
#include <json-c/json.h>

#include <algorithm>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cctype>
#include <sstream>
+3 −0
Changes for src/serverconfig.cpp: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@
#include <set>
#include <sstream>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/stat.h>