summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-10-17 13:57:45 -0600
committerBrian Paul <[email protected]>2017-10-23 15:10:24 -0600
commitacd6ea0cc03501f5c79107749ec8a84e69c7979d (patch)
tree6f0dafb3f2f92fe8c5441b1670d103289497f284 /src
parent623077393631d8c42d5e4aafeee446ca165e0b7e (diff)
util: add util_strdup() wrapper macro
To work around MSVC warning that strdup() is a deprecated POSIX function. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/u_string.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/u_string.h b/src/util/u_string.h
index fa0241e5423..ce454308d7b 100644
--- a/src/util/u_string.h
+++ b/src/util/u_string.h
@@ -203,6 +203,7 @@ util_strstr(const char *haystack, const char *needle)
#define util_strcasecmp stricmp
+#define util_strdup _strdup
#else
@@ -217,6 +218,7 @@ util_strstr(const char *haystack, const char *needle)
#define util_strncat strncat
#define util_strstr strstr
#define util_strcasecmp strcasecmp
+#define util_strdup strdup
#endif