diff mbox

[v3,11/13] example: odp_l2fwd: fix c99 implicit declaration of function ‘strtok_r’

Message ID 1424896591-4639-12-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 25, 2015, 8:36 p.m. UTC
odp_l2fwd.c:497: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/l2fwd/odp_l2fwd.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index 0326a3c..b0a93fa 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -10,6 +10,9 @@ 
  * @example odp_l2fwd.c  ODP basic forwarding application
  */
 
+/** enable strtok */
+#define _POSIX_C_SOURCE 200112L
+
 #include <stdlib.h>
 #include <string.h>
 #include <getopt.h>