1 --- a/include/h2o/socket.h
2 +++ b/include/h2o/socket.h
3 @@ -29,6 +29,7 @@ extern "C" {
5 #include <sys/socket.h>
6 #include <openssl/ssl.h>
7 +#include <openssl/opensslconf.h>
9 #include "h2o/memory.h"
10 #include "h2o/openssl_backport.h"
11 @@ -44,7 +45,11 @@ extern "C" {
13 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
14 #define H2O_USE_ALPN 1
15 +#ifndef OPENSSL_NO_NEXTPROTONEG
18 +#define H2O_USE_NPN 0
20 #elif OPENSSL_VERSION_NUMBER >= 0x10001000L
21 #define H2O_USE_ALPN 0