From 32c7b3303a84147068ed48d5934eb631788ba455 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 6 Apr 2020 18:59:19 -0700 Subject: [PATCH] h2o: fix compilation without engine support Signed-off-by: Rosen Penev --- libs/h2o/Makefile | 2 +- libs/h2o/patches/600-engine.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 libs/h2o/patches/600-engine.patch diff --git a/libs/h2o/Makefile b/libs/h2o/Makefile index 882999f1a..31a9cda00 100644 --- a/libs/h2o/Makefile +++ b/libs/h2o/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=h2o PKG_VERSION:=2.2.6 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE_URL:=https://codeload.github.com/h2o/h2o/tar.gz/v${PKG_VERSION}? PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/libs/h2o/patches/600-engine.patch b/libs/h2o/patches/600-engine.patch new file mode 100644 index 000000000..f36fa3b89 --- /dev/null +++ b/libs/h2o/patches/600-engine.patch @@ -0,0 +1,28 @@ +--- a/deps/neverbleed/neverbleed.c ++++ b/deps/neverbleed/neverbleed.c +@@ -1486,6 +1486,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf) + close(pipe_fds[0]); + pipe_fds[0] = -1; + ++#ifndef OPENSSL_NO_ENGINE + /* setup engine */ + if ((nb->engine = ENGINE_new()) == NULL || !ENGINE_set_id(nb->engine, "neverbleed") || + !ENGINE_set_name(nb->engine, "privilege separation software engine") || !ENGINE_set_RSA(nb->engine, rsa_method) +@@ -1497,6 +1498,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf) + goto Fail; + } + ENGINE_add(nb->engine); ++#endif + + /* setup thread key */ + pthread_key_create(&nb->thread_key, dispose_thread_data); +@@ -1515,7 +1517,9 @@ Fail: + if (listen_fd != -1) + close(listen_fd); + if (nb->engine != NULL) { ++#ifndef OPENSSL_NO_ENGINE + ENGINE_free(nb->engine); ++#endif + nb->engine = NULL; + } + return -1;