summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2022-03-05 22:01:50 +0100
committerAndreas Schneider <asn@cryptomilk.org>2023-02-16 15:31:43 +0100
commit98c451d67d526b61ac1f386cd017df235fef6d82 (patch)
tree0c32e8804c49c40437d2a7ee29e821cd386e0a3d
parent4aae8164a24b66ecb5d2cbb617a255f75c486214 (diff)
downloadcmocka-98c451d67d526b61ac1f386cd017df235fef6d82.zip
cmocka-98c451d67d526b61ac1f386cd017df235fef6d82.tar.gz
cmocka-98c451d67d526b61ac1f386cd017df235fef6d82.tar.bz2
include: Define strtok_r with Visual Studio
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--include/cmocka_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cmocka_private.h b/include/cmocka_private.h
index d20d841..4d3ff30 100644
--- a/include/cmocka_private.h
+++ b/include/cmocka_private.h
@@ -28,6 +28,7 @@
# ifdef _MSC_VER
# include <stdio.h> /* _snprintf */
+# include <string.h> /* strtok_s */
# undef inline
# define inline __inline
@@ -38,6 +39,7 @@
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
+# define strtok_r strtok_s
# if defined(HAVE__SNPRINTF_S)
# undef snprintf