From c5b2eb22221144620fd80cacce8c9542c83fc072 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Tue, 25 Apr 2017 08:23:42 +0100 Subject: [PATCH] vcd: Removed GNU dependency Why isn't this in the standard C library, I wonder. Signed-off-by: Michel Pollet --- simavr/sim/sim_vcd_file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simavr/sim/sim_vcd_file.c b/simavr/sim/sim_vcd_file.c index 10dc273..f0d80be 100644 --- a/simavr/sim/sim_vcd_file.c +++ b/simavr/sim/sim_vcd_file.c @@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License along with simavr. If not, see . */ -#define _GNU_SOURCE /* for strdupa */ + #include #include #include @@ -34,6 +34,8 @@ DEFINE_FIFO(avr_vcd_log_t, avr_vcd_fifo); +#define strdupa(__s) strcpy(alloca(strlen(__s)+1), __s) + static void _avr_vcd_notify( struct avr_irq_t * irq, -- 2.39.5