diff mbox

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

Message ID 1424895578-24971-9-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_fwd_db.c:61: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_fwd_db.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

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