Skip to content

Commit f1dbc39

Browse files
committed
fixup! native: Explicitly opt in to GNUisms rather than setting std=gnu11
1 parent 3189390 commit f1dbc39

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

boards/native/Makefile.include

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ CFLAGS_DBG ?= -g3
2828
# This allows using functions like `kill()` that are not in the C but in the
2929
# POSIX standard, sigwait requires at least this version
3030
CFLAGS += -D_POSIX_C_SOURCE=200112L
31-
# F_SETOWN is a Linux extension only available in -std=c11 mode with:
31+
# F_SETOWN is a Linux extension only available in -std=c11 mode with this; same
32+
# goes for the gregs[REG_EIP] access if irq_cpu.c and native_cpu.c
3233
CFLAGS += -D_GNU_SOURCE
3334

3435
ifneq (,$(filter backtrace,$(USEMODULE)))

cpu/native/irq_cpu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
#define VALGRIND_DEBUG(...)
3030
#endif
3131

32-
/* __USE_GNU for gregs[REG_EIP] access under Linux */
33-
#define __USE_GNU
3432
#include <signal.h>
35-
#undef __USE_GNU
3633

3734
#include "irq.h"
3835
#include "cpu.h"

cpu/native/native_cpu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
#include <unistd.h>
2626
#include <stdlib.h>
2727

28-
#define __USE_GNU
2928
#include <signal.h>
30-
#undef __USE_GNU
3129

3230
#include <ucontext.h>
3331
#include <err.h>

0 commit comments

Comments
 (0)