1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00
openwrt-packages/libs/h2o/patches/100-socket_disable_npn.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

23 lines
562 B
Diff

--- 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