cmake BUGFIX updated function presence check
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26d8f22..d9457c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -237,7 +237,7 @@
src/xml.h
src/dict.h)
-check_symbol_exists(vdprintf stdio.h HAVE_VDPRINTF)
+check_symbol_exists(vdprintf stdio.h stdarg.h HAVE_VDPRINTF)
if(HAVE_VDPRINTF)
add_definitions(-DHAVE_VDPRINTF)
endif(HAVE_VDPRINTF)
diff --git a/src/printer.c b/src/printer.c
index ca9b636..ea611ed 100644
--- a/src/printer.c
+++ b/src/printer.c
@@ -3,7 +3,7 @@
* @author Radek Krejci <rkrejci@cesnet.cz>
* @brief Wrapper for all libyang printers.
*
- * Copyright (c) 2015 CESNET, z.s.p.o.
+ * Copyright (c) 2015 - 2018 CESNET, z.s.p.o.
*
* This source code is licensed under BSD 3-Clause License (the "License").
* You may not use this file except in compliance with the License.
@@ -13,6 +13,8 @@
*/
#define _GNU_SOURCE /* vasprintf(), vdprintf() */
+#define _POSIX_C_SOURCE 200809L
+
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>