diff mbox

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

Message ID 1424895578-24971-11-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_stream.c:90:2: error: implicit declaration of function
‘strtok_r’ [-Werror=implicit-function-declaration]
  while (NULL != (token = strtok_r(str, ":", &save))) {

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

Patch

diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index 92050a4..ed07355 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -4,6 +4,9 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
+/* enable strtok */
+#define _POSIX_C_SOURCE 200112L
+
 #include <stdlib.h>
 #include <string.h>