Handle where _GNU_SOURCE already defined.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 31 Mar 2009 07:14:53 +0000 (17:44 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 31 Mar 2009 07:14:53 +0000 (17:44 +1030)
Reported by Tim Post.

ccan/tap/tap.c

index 5c475bcce97cd7232ca7a950fc0ceba20ada533b..0eaec9a5f852827d879553cfd50cd8bdf252f2c6 100644 (file)
  * 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 <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>