mirror of
https://github.com/espressif/mbedtls.git
synced 2025-05-09 11:21:21 +08:00
Fixed issue of redefination warning messages for _GNU_SOURCE
This commit addresses redefinition warning messages encountered during compilation by adding a pre-check before declaring _GNU_SOURCE.
This commit is contained in:
parent
1362faee34
commit
69f3470538
@ -5,10 +5,12 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#if defined(__linux__) || defined(__midipix__) && !defined(_GNU_SOURCE)
|
||||
#if defined(__linux__) || defined(__midipix__)
|
||||
/* Ensure that syscall() is available even when compiling with -std=c99 */
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
||||
#endif /* defined(__clang__) && (__clang_major__ >= 4) */
|
||||
|
||||
/* Ensure that SIG_SETMASK is defined when -std=c99 is used. */
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user