diff --git a/include/ec.h b/include/ec.h index fbf048111..561062c2f 100644 --- a/include/ec.h +++ b/include/ec.h @@ -21,6 +21,9 @@ #if !defined (__USE_GNU) /* for memmem(), strsignal(), etc etc... */ #define __USE_GNU #endif +#if !defined (_GNU_SOURCE) /* for memmem(), strsignal(), etc etc... on musl */ + #define _GNU_SOURCE +#endif #ifdef OS_SOLARIS #define _REENTRANT /* for strtok_r() */ #endif @@ -28,6 +31,9 @@ #if defined (__USE_GNU) #undef __USE_GNU #endif +#if defined (_GNU_SOURCE) + #undef _GNU_SOURCE +#endif #include #include #include