OSDN Git Service

_GNU_SOURCE must be defined before any #include.
authorElliott Hughes <enh@google.com>
Mon, 5 Dec 2016 21:33:29 +0000 (13:33 -0800)
committerElliott Hughes <enh@google.com>
Mon, 5 Dec 2016 21:33:29 +0000 (13:33 -0800)
Fixes the "asprintf undeclared" warning in this code.

Bug: N/A
Test: builds
Change-Id: I42e1bfbdbc0391c5e5d7908204f9064ec858c84d

contrib/android/block_range.c

index d054123..2f951c7 100644 (file)
@@ -1,7 +1,6 @@
+#define _GNU_SOURCE
+
 #include "block_range.h"
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
 #include <stdio.h>
 
 struct block_range *new_block_range(blk64_t start, blk64_t end)