Browse Source

Handle where _GNU_SOURCE already defined.
Reported by Tim Post.

Rusty Russell 17 years ago
parent
commit
2c2612e5cd
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ccan/tap/tap.c

+ 4 - 1
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 <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>