diff mbox

[01/12] example: odp_generator: fix c99 nested extern

Message ID 1424468661-967-3-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 20, 2015, 9:44 p.m. UTC
odp_generator.c:759:5: error: implicit declaration of function
‘strtok_r’ [-Werror=implicit-function-declaration]
     token = strtok_r(str, ",", &save);
     ^

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 example/generator/odp_generator.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index db9e0c2..2d5eb26 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -10,6 +10,8 @@ 
  * @example odp_generator.c ODP loopback demo application
  */
 
+/* enable strtok */
+#define _POSIX_C_SOURCE 200112L
 #include <stdlib.h>
 #include <string.h>
 #include <getopt.h>