From 9310b1fa695f5aaca9f4c11b7f1937579f27ffd8 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Dec 2014 23:29:37 -0600 Subject: [PATCH] fix up files for mfshell so that strdup is available on old systems --- mfshell/main.c | 1 + mfshell/mfshell.c | 1 + mfshell/options.c | 1 + 3 files changed, 3 insertions(+) diff --git a/mfshell/main.c b/mfshell/main.c index 1ff4828..d7d8d6d 100644 --- a/mfshell/main.c +++ b/mfshell/main.c @@ -18,6 +18,7 @@ */ #define _POSIX_C_SOURCE 200809L // for strdup +#define _GNU_SOURCE // for strdup on old systems #include #include diff --git a/mfshell/mfshell.c b/mfshell/mfshell.c index 038fcbb..1fc8fcb 100644 --- a/mfshell/mfshell.c +++ b/mfshell/mfshell.c @@ -23,6 +23,7 @@ #else #define _WITH_GETLINE // on freebsd for getline #endif +#define _GNU_SOURCE // for strdup on old systems #include #include diff --git a/mfshell/options.c b/mfshell/options.c index 12a9d1e..b2c93b2 100644 --- a/mfshell/options.c +++ b/mfshell/options.c @@ -17,6 +17,7 @@ */ #define _POSIX_C_SOURCE 200809L // for strdup +#define _GNU_SOURCE // for strdup on old systems #include #include