From 59871deab903d5e38d97b7d84dd2b6df446babe9 Mon Sep 17 00:00:00 2001 From: Khyber Sen Date: Mon, 27 Jun 2022 10:39:55 -0700 Subject: [PATCH] Removed `#define _POSIX_C_SOURCE`s where `#define _GNU_SOURCE` was also defined, as `_GNU_SOURCE` implicitly defines `_POSIX_C_SOURCE`, but on BSD/macOS, `_POSIX_C_SOURCE` prevents non-POSIX extensions from being defined. --- src/cbortojson.c | 1 - tools/json2cbor/json2cbor.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/cbortojson.c b/src/cbortojson.c index 856d9268..fff9d298 100644 --- a/src/cbortojson.c +++ b/src/cbortojson.c @@ -25,7 +25,6 @@ #define _BSD_SOURCE 1 #define _DEFAULT_SOURCE 1 #define _GNU_SOURCE 1 -#define _POSIX_C_SOURCE 200809L #ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif diff --git a/tools/json2cbor/json2cbor.c b/tools/json2cbor/json2cbor.c index c13a7510..26e80fc6 100644 --- a/tools/json2cbor/json2cbor.c +++ b/tools/json2cbor/json2cbor.c @@ -22,7 +22,6 @@ ** ****************************************************************************/ -#define _POSIX_C_SOURCE 200809L #define _GNU_SOURCE #include "cbor.h" #include "cborinternal_p.h"