diff mbox

[v4,4/7] example: fix multiple c99 implicit declaration of function ‘strtok_r’

Message ID 1424968984-30171-5-git-send-email-mike.holmes@linaro.org
State Superseded
Headers show

Commit Message

Mike Holmes Feb. 26, 2015, 4:43 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 example/generator/odp_generator.c | 3 +++
 example/ipsec/odp_ipsec.c         | 2 ++
 example/ipsec/odp_ipsec_fwd_db.c  | 3 +++
 example/ipsec/odp_ipsec_sa_db.c   | 3 +++
 example/ipsec/odp_ipsec_sp_db.c   | 3 +++
 5 files changed, 14 insertions(+)
diff mbox

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index f3a315d..3870fd1 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -10,6 +10,9 @@ 
  * @example odp_generator.c ODP loopback demo application
  */
 
+/** enable strtok */
+#define _POSIX_C_SOURCE 200112L
+
 #include <time.h>
 #include <stdlib.h>
 #include <string.h>
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>
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>
 
diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c
index cf619d8..5837cb6 100644
--- a/example/ipsec/odp_ipsec_sa_db.c
+++ b/example/ipsec/odp_ipsec_sa_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>
 
diff --git a/example/ipsec/odp_ipsec_sp_db.c b/example/ipsec/odp_ipsec_sp_db.c
index b3b138f..2ce8c93 100644
--- a/example/ipsec/odp_ipsec_sp_db.c
+++ b/example/ipsec/odp_ipsec_sp_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>