perf tools: define _DEFAULT_SOURCE for glibc_2.20 47/28447/1 accepted/tizen/common/20141008.083157 submit/tizen/20141008.044841
authorChanho Park <chanho61.park@samsung.com>
Fri, 12 Sep 2014 02:03:01 +0000 (11:03 +0900)
committerChanho Park <chanho61.park@samsung.com>
Tue, 7 Oct 2014 10:14:10 +0000 (19:14 +0900)
_BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc
2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should
also be defined.

[1]: https://sourceware.org/glibc/wiki/Release/2.20

Change-Id: If79141944eab78f0fa6a747a4cf1c9109d59485e
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
tools/perf/util/util.h

index a535359..fb23718 100644 (file)
@@ -39,6 +39,8 @@
 
 #define _ALL_SOURCE 1
 #define _BSD_SOURCE 1
+/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */
+#define _DEFAULT_SOURCE 1
 #define HAS_BOOL
 
 #include <unistd.h>