diff mbox

[v2,05/13] example: odp_ipsec: fix c99 implicit declaration of function ‘strtok_r’

Message ID 1424895578-24971-6-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 25, 2015, 8:19 p.m. UTC
odp_ipsec.c:1400: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/ipsec/odp_ipsec.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index e53a6ec..70cd957 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -11,6 +11,8 @@ 
  */
 
 #define _BSD_SOURCE
+/* enable strtok */
+#define _POSIX_C_SOURCE 200112L
 #include <stdlib.h>
 #include <string.h>
 #include <getopt.h>