From: Michel Pollet Date: Tue, 25 Apr 2017 07:23:42 +0000 (+0100) Subject: vcd: Removed GNU dependency X-Git-Tag: v1.6~46 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=c5b2eb22221144620fd80cacce8c9542c83fc072;p=sx%2Fsimavr.git vcd: Removed GNU dependency Why isn't this in the standard C library, I wonder. Signed-off-by: Michel Pollet --- 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,