Skip to content

Commit

Permalink
fix: set _POSIX_C_SOURCE define for strtok_r usage
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth committed Feb 4, 2025
1 parent 49b01a6 commit d02ea0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/atclient/src/atkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>

// TODO remove use of strtok_r so we can conform to C99 instead of POSIX 2001
#if _POSIX_C_SOURCE < 200112L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L
#endif
#include <string.h>
extern char *strtok_r(char *, const char *, char **);
// END (keep string.h include after removing this temp fix)

#define TAG "atkey"

Expand Down

0 comments on commit d02ea0d

Please sign in to comment.