aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/version.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/version.c b/lib/version.c
index 8170106ee..c7fe42a07 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -127,6 +127,16 @@ char *curl_version(void)
int i = 0;
int j;
+#ifdef DEBUGBUILD
+ /* Override version string when environment variable CURL_VERSION is set */
+ const char *debugversion = getenv("CURL_VERSION");
+ if(debugversion) {
+ strncpy(out, debugversion, sizeof(out)-1);
+ out[sizeof(out)-1] = '\0';
+ return out;
+ }
+#endif
+
src[i++] = LIBCURL_NAME "/" LIBCURL_VERSION;
#ifdef USE_SSL
Curl_ssl_version(ssl_version, sizeof(ssl_version));