You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (asprintf(&metadatakey, "%s%s", item->string, meta_data_marker) <0||metadatakey==NULL)
This happens because it defines #define _POSIX_C_SOURCE 200809L, which on some libcs, like macOS's and BSD's (I didn't test BSD, but I've seen similar issues saying the same thing), causes any non-POSIX functionality to not be declared. Thus, when #define _GNU_SOURCE is defined, which normally defines GNU extensions like asprintf, it is superseded by the #define _POSIX_C_SOURCE 200809L.
Is the #define _POSIX_C_SOURCE 200809L needed? Without that define, I was able to compile everything. If it's not needed, I can submit a PR to remove it so it compiles on macOS and BSDs.
The text was updated successfully, but these errors were encountered:
json2cbor.c
doesn't compile on macOS/BSD libc with the following error:tinycbor/tools/json2cbor/json2cbor.c
Line 201 in 0a488a5
This happens because it defines
#define _POSIX_C_SOURCE 200809L
, which on somelibc
s, like macOS's and BSD's (I didn't test BSD, but I've seen similar issues saying the same thing), causes any non-POSIX functionality to not be declared. Thus, when#define _GNU_SOURCE
is defined, which normally defines GNU extensions likeasprintf
, it is superseded by the#define _POSIX_C_SOURCE 200809L
.tinycbor/tools/json2cbor/json2cbor.c
Lines 25 to 26 in 0a488a5
Is the
#define _POSIX_C_SOURCE 200809L
needed? Without that define, I was able to compile everything. If it's not needed, I can submit a PR to remove it so it compiles on macOS and BSDs.The text was updated successfully, but these errors were encountered: