summaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/version.c b/lib/version.c
index 14b0531d3..941313dfb 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -385,6 +385,8 @@ static curl_version_info_data version_info = {
NULL, /* ssh lib version */
0, /* brotli_ver_num */
NULL, /* brotli version */
+ 0, /* nghttp2 version number */
+ NULL /* nghttp2 version string */
};
curl_version_info_data *curl_version_info(CURLversion stamp)
@@ -460,6 +462,14 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
version_info.brotli_version = brotli_buffer;
#endif
+#ifdef USE_NGHTTP2
+ {
+ nghttp2_info *h2 = nghttp2_version(0);
+ version_info.nghttp2_ver_num = h2->version_num;
+ version_info.nghttp2_version = h2->version_str;
+ }
+#endif
+
(void)stamp; /* avoid compiler warnings, we don't use this */
initialized = true;