From 78959ad64b2ec8a65b7be085b341ce2c124bfb81 Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Wed, 14 Oct 2026 21:49:11 +0800 Subject: [PATCH] fix(build): define _GNU_SOURCE so musl declares strcasestr --- src/commands.c | 4 ++-- src/message.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands.c b/src/commands.c index 368a495..ba42a9b 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1,5 +1,5 @@ -#ifndef _DEFAULT_SOURCE -#define _DEFAULT_SOURCE /* for strcasestr() on glibc */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* for strcasestr() on glibc and musl */ #endif #if defined(__APPLE__) && !defined(_DARWIN_C_SOURCE) #define _DARWIN_C_SOURCE /* for strcasestr() on macOS */ diff --git a/src/message.c b/src/message.c index b37b9a2..098df5b 100644 --- a/src/message.c +++ b/src/message.c @@ -1,5 +1,5 @@ -#ifndef _DEFAULT_SOURCE -#define _DEFAULT_SOURCE /* for strcasestr() on glibc */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* for strcasestr() on glibc and musl */ #endif #if defined(__APPLE__) && !defined(_DARWIN_C_SOURCE) #define _DARWIN_C_SOURCE /* for strcasestr() on macOS */