packages/libs/h2o/patches/100-socket_disable_npn.patch
James Taylor c9fa74bf43 h2o: add package
H2O is a new generation HTTP server that provides quicker response to users
  with less CPU utilization when compared to older generation of web servers.
  Designed from ground-up, the server takes full advantage of HTTP/2 features
  including prioritized content serving and server push, promising outstanding
  experience to the visitors of your web site.

Signed-off-by: James Taylor <james@jtaylor.id.au>
2019-12-10 21:32:52 +11:00

22 lines
536 B
Diff

--- a/include/h2o/socket.h
+++ b/include/h2o/socket.h
@@ -29,6 +29,7 @@
#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"
@@ -45,7 +44,11 @@
#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