diff mbox

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

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

Commit Message

Mike Holmes Feb. 20, 2015, 9:44 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 6cd6ae0..f86532e 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -10,6 +10,8 @@ 
  * @example odp_example_ipsec.c  ODP basic packet IO cross connect with IPsec test application
  */
 
+/* enable strtok */
+#define _POSIX_C_SOURCE 200112L
 #include <stdlib.h>
 #include <string.h>
 #include <getopt.h>