Fixes https://bugs.linaro.org/show_bug.cgi?id=787

Adding _POSIX_C_SOURCE 200809L allows compilation to std=c99 by adding
ftruncate from this standard.

Signed-off-by: Mike Holmes <[email protected]>
---
 platform/linux-generic/odp_shared_memory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/platform/linux-generic/odp_shared_memory.c 
b/platform/linux-generic/odp_shared_memory.c
index abf6da3..99c5b40 100644
--- a/platform/linux-generic/odp_shared_memory.c
+++ b/platform/linux-generic/odp_shared_memory.c
@@ -4,6 +4,9 @@
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
+/*ftruncate _POSIX_C_SOURCE 200809L */
+#define _POSIX_C_SOURCE 200809L
+
 #include <odp_shared_memory.h>
 #include <odp_internal.h>
 #include <odp_spinlock.h>
-- 
2.1.0


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to