From 979b31947bdbbfa27add5602119433f7be744097 Mon Sep 17 00:00:00 2001
From: sbbs <>
Date: Mon, 28 Sep 2015 22:36:12 +0000
Subject: [PATCH] ifdef-out the asprintf and vasprintf prototypes when building
 w/non-MSVC tools (caused build failure on redefinition of functions).

---
 src/xpdev/xpprintf.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xpdev/xpprintf.h b/src/xpdev/xpprintf.h
index 7033f66f22..40bf40b768 100644
--- a/src/xpdev/xpprintf.h
+++ b/src/xpdev/xpprintf.h
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
  *																			*
  * This library is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU Lesser General Public License		*
@@ -79,8 +79,11 @@ DLLEXPORT char* DLLCALL xp_asprintf_end(char *format, size_t *endlen);
 DLLEXPORT char* DLLCALL xp_asprintf(const char *format, ...);
 DLLEXPORT char* DLLCALL xp_vasprintf(const char *format, va_list va);
 DLLEXPORT int DLLCALL xp_printf_get_type(const char *format);
+#if defined(_MSC_VER) || defined(__MSVCRT__)
 DLLEXPORT int DLLCALL vasprintf(char **strptr, char *format, va_list va);
 DLLEXPORT int DLLCALL asprintf(char **strptr, char *format, ...);
+#endif
+
 #if defined(__cplusplus)
 }
 #endif
-- 
GitLab