Skip to content

Commit

Permalink
add missing patch
Browse files Browse the repository at this point in the history
make libhttpserver patches unconditional
  • Loading branch information
mirostauder committed Jan 24, 2023
1 parent 42c135d commit f4e9f9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
10 changes: 1 addition & 9 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,13 @@ libssl/openssl/libssl.a:
libssl: libssl/openssl/libssl.a


GCC_VERSION := $(shell gcc -dumpversion)
MIN_VERSION := 4.9.0
REQUIRE_PATCH = false
ifeq ($(MIN_VERSION),$(lastword $(sort $(GCC_VERSION) $(MIN_VERSION))))
REQUIRE_PATCH = true
endif

libhttpserver/libhttpserver/build/src/.libs/libhttpserver.a: libmicrohttpd/libmicrohttpd/src/microhttpd/.libs/libmicrohttpd.a re2/re2/obj/libre2.a
cd libhttpserver && rm -rf libhttpserver-*/ || true
cd libhttpserver && tar -zxf libhttpserver-*.tar.gz
ifeq ($(REQUIRE_PATCH), true)
cd libhttpserver/libhttpserver && patch -p1 < ../noexcept.patch
cd libhttpserver/libhttpserver && patch -p1 < ../re2_regex.patch
cd libhttpserver/libhttpserver && patch -p1 < ../final_val_post_process.patch
endif
cd libhttpserver/libhttpserver && patch -p1 < ../empty_uri_log_crash.patch
ifeq ($(UNAME_S),FreeBSD)
sed -i -e 's/\/bin\/bash/\/usr\/local\/bin\/bash/' libhttpserver/libhttpserver/bootstrap
endif
Expand Down
16 changes: 11 additions & 5 deletions deps/libhttpserver/empty_uri_log_crash.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
diff --git src/webserver.cpp src/webserver.cpp
index 5ae7381..04a5a28 100644
--- src/webserver.cpp
+++ src/webserver.cpp
@@ -443,7 +443,7 @@ int policy_callback (void *cls, const struct sockaddr* addr, socklen_t addrlen)
commit 2678fcf0bc7a645a4043f5c194dfc75da35ab072
Author: Miro Stauder <[email protected]>
Date: Tue Jan 24 15:05:11 2023 +0000

webserver.patch

diff --git a/src/webserver.cpp b/src/webserver.cpp
index 38542f2..0ae69dc 100644
--- a/src/webserver.cpp
+++ b/src/webserver.cpp
@@ -441,7 +441,7 @@ MHD_Result policy_callback (void *cls, const struct sockaddr* addr, socklen_t ad
void* uri_log(void* cls, const char* uri)
{
struct details::modded_request* mr = new details::modded_request();
Expand Down

0 comments on commit f4e9f9c

Please sign in to comment.