Skip to content

Commit

Permalink
Merge pull request #1220 from LocutusOfBorg/1219-fix
Browse files Browse the repository at this point in the history
Define _GNU_SOURCE to make sure memmem is found when build with musl-clang
  • Loading branch information
Alexander Köppe committed Mar 25, 2023
2 parents 9ec4066 + 3ef5115 commit f03a117
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ec.h
Expand Up @@ -21,13 +21,19 @@
#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
#include <string.h>
#if defined (__USE_GNU)
#undef __USE_GNU
#endif
#if defined (_GNU_SOURCE)
#undef _GNU_SOURCE
#endif
#include <strings.h>
#include <unistd.h>
#include <time.h>
Expand Down

0 comments on commit f03a117

Please sign in to comment.