summaryrefslogtreecommitdiff
path: root/libs/h2o/patches/100-socket_disable_npn.patch
blob: d3f9c7169819e026c18c239e92a88c77e606e570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/include/h2o/socket.h
+++ b/include/h2o/socket.h
@@ -29,6 +29,7 @@ extern "C" {
 #include <stdint.h>
 #include <sys/socket.h>
 #include <openssl/ssl.h>
+#include <openssl/opensslconf.h>
 #include "h2o/cache.h"
 #include "h2o/memory.h"
 #include "h2o/openssl_backport.h"
@@ -44,7 +45,11 @@ extern "C" {
 
 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
 #define H2O_USE_ALPN 1
+#ifndef OPENSSL_NO_NEXTPROTONEG
 #define H2O_USE_NPN 1
+#else
+#define H2O_USE_NPN 0
+#endif
 #elif OPENSSL_VERSION_NUMBER >= 0x10001000L
 #define H2O_USE_ALPN 0
 #define H2O_USE_NPN 1