From: Rusty Russell Date: Tue, 31 Mar 2009 07:14:53 +0000 (+1030) Subject: Handle where _GNU_SOURCE already defined. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=2c2612e5cd37c582a8269699887e1e87df399c7b Handle where _GNU_SOURCE already defined. Reported by Tim Post. --- diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index 5c475bcc..0eaec9a5 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -23,7 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#define _GNU_SOURCE +/* FIXME: The real fix is an asprintf module. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif #include #include #include