h2o: fix compilation without engine support
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
db7414eaa9
commit
32c7b3303a
2 changed files with 29 additions and 1 deletions
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=h2o
|
PKG_NAME:=h2o
|
||||||
PKG_VERSION:=2.2.6
|
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_URL:=https://codeload.github.com/h2o/h2o/tar.gz/v${PKG_VERSION}?
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
28
libs/h2o/patches/600-engine.patch
Normal file
28
libs/h2o/patches/600-engine.patch
Normal file
|
@ -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;
|
Loading…
Reference in a new issue