Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/url.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

/* _GNU_SOURCE must stay defined for the rest of this file. On musl libc
* the feature-test macros are re-evaluated by every system header, so
* undefining it here would hide the clock_gettime()/ctime_r() prototypes
* that ut.h and dprint.h (via <time.h>) rely on, breaking the build. */
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#undef _GNU_SOURCE

#include "../mem/mem.h"
#include "../ut.h"
Expand Down
9 changes: 4 additions & 5 deletions modules/mathops/math_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
#include <stdlib.h>
#include <math.h>

#ifdef _ADDED_XOPEN
#undef _ADDED_XOPEN
#undef _XOPEN_SOURCE
#undef _GNU_SOURCE
#endif
/* The feature-test macros above must stay defined for the OpenSIPS headers
* below. musl evaluates them in every system header, so undefining them
* here leaves the translation unit with none of them set and takes ctime_r()
* out of <time.h>, which dprint.h needs. */

#include <errno.h>
#include <ctype.h>
Expand Down
9 changes: 4 additions & 5 deletions modules/mathops/mathops.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
#include <stdio.h>
#include <stdlib.h>

#ifdef _ADDED_XOPEN
#undef _ADDED_XOPEN
#undef _XOPEN_SOURCE
#undef _GNU_SOURCE
#endif
/* The feature-test macros above must stay defined for the OpenSIPS headers
* below. musl evaluates them in every system header, so undefining them
* here leaves the translation unit with none of them set and takes ctime_r()
* out of <time.h>, which dprint.h needs. */

#include "../../sr_module.h"
#include "../../dprint.h"
Expand Down