Since glibc 2.20, the _BSD_SOURCE macro is deprecated. (#1425)

It now has the same effect as defining _DEFAULT_SOURCE, but generates a
compile-time warning (unless _DEFAULT_SOURCE is also defined). To allow
code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE
in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2016-11-11 12:09:51 +01:00
committed by GitHub
parent 9f556e1c38
commit dc5ae4638f
+2 -2
View File
@@ -126,9 +126,9 @@ if(ENABLE_LTO)
endif()
endif()
# Define _BSD_SOURCE if we use default port and compiler default libc
# Define _BSD_SOURCE and _DEFAULT_SOURCE if we use default port and compiler default libc
if(${PORT_DIR} STREQUAL "${CMAKE_SOURCE_DIR}/targets/default" AND NOT JERRY_LIBC)
set(DEFINES_JERRY ${DEFINES_JERRY} _BSD_SOURCE)
set(DEFINES_JERRY ${DEFINES_JERRY} _BSD_SOURCE _DEFAULT_SOURCE)
endif()
# Compiler / Linker flags