From 2c58f8d6dda1ec9160652fd77bd01b3e482b81c2 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 13 Sep 2020 13:19:32 +0200 Subject: [PATCH] Set _DEFAULT_SOURCE to ensure SO_REUSEPORT is present This resolves an issue with glibc 2.31 I experienced where SO_REUSEPORT would be missing because glibc only includes linux headers if __USE_MISC is set which is caused by _DEFAULT_SOURCE in features.h. --- httpserver.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpserver.h b/httpserver.h index 27cda0b..38758b7 100644 --- a/httpserver.h +++ b/httpserver.h @@ -316,6 +316,8 @@ int main() { #define KQUEUE #endif +#define _DEFAULT_SOURCE + #include #include #include