Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / protocol-plugin / lib / cpluff / libcpluff / psymbol.c
index a2bca4a..6338d0d 100644 (file)
  * Dynamic plug-in symbols
  */
 
+#ifdef __linux__
+#ifndef _POSIX_C_SOURCE
+// Defining _POSIX_C_SOURCE macro with 200809L (or greater) as value
+// causes header files to expose definitions
+// corresponding to the POSIX.1-2008 base
+// specification (excluding the XSI extension).
+// For POSIX.1-2008 base specification,
+// Refer http://pubs.opengroup.org/stage7tc1/
+//
+// For this specific file, see use of strndup,
+// Refer http://man7.org/linux/man-pages/man3/strdup.3.html
+#define _POSIX_C_SOURCE 200809L
+#endif
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>