commit 29ca36737f24cc173efa6f234551d066a70328e6
parent 9278698ba9f97aaa444a462bbf9e840a414b8936
Author: Joris Vink <joris@sanctorum.se>
Date: Fri, 13 Feb 2026 23:07:46 +0100
glibc 2.43 is doing dumb things, hack around it.
Diffstat:
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/include/kore/kore.h b/include/kore/kore.h
@@ -21,6 +21,15 @@
#define daemon portability_is_king
#endif
+/*
+ * Extremely ugly hack to get past glibc 2.43 its insane implementation
+ * of C23 features shoved down a C99 code base.
+ */
+#if defined(__GLIBC__)
+#undef __GLIBC_USE_ISOC23
+#include <string.h>
+#endif
+
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
@@ -36,8 +45,8 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
-#include <signal.h>
#include <string.h>
+#include <signal.h>
#include <syslog.h>
#include <unistd.h>
#include <stdarg.h>
diff --git a/src/cli.c b/src/cli.c
@@ -22,6 +22,15 @@
#include <sys/mman.h>
#include <sys/time.h>
+/*
+ * Extremely ugly hack to get past glibc 2.43 its insane implementation
+ * of C23 features shoved down a C99 code base.
+ */
+#if defined(__GLIBC__)
+#undef __GLIBC_USE_ISOC23
+#include <string.h>
+#endif
+
#if !defined(KODEV_MINIMAL)
#include <openssl/err.h>
#include <openssl/pem.h>
diff --git a/src/http.c b/src/http.c
@@ -26,7 +26,6 @@
#include <float.h>
#include <time.h>
#include <stdio.h>
-#include <string.h>
#include "kore.h"
#include "http.h"