aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http2.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 0ac9c4b12..0001fae5d 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1549,4 +1549,25 @@ CURLcode Curl_http2_switched(struct connectdata *conn,
return CURLE_OK;
}
-#endif
+#else /* !USE_NGHTTP2 */
+
+/* Satisfy external references even if http2 is not compiled in. */
+
+#define CURL_DISABLE_TYPECHECK
+#include <curl/curl.h>
+
+char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num)
+{
+ (void) h;
+ (void) num;
+ return NULL;
+}
+
+char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header)
+{
+ (void) h;
+ (void) header;
+ return NULL;
+}
+
+#endif /* USE_NGHTTP2 */