Files
haikuports/net-proxy/haproxy/patches/haproxy-1.4.22.patch
2015-10-19 23:18:03 +00:00

48 lines
1.4 KiB
Diff

diff -ur haproxy-1.4.22/Makefile haproxy-1.4.22-haiku/Makefile
--- haproxy-1.4.22/Makefile 2012-08-14 07:09:31.000000000 +0000
+++ haproxy-1.4.22-haiku/Makefile 2012-12-28 02:09:24.868483072 +0000
@@ -176,6 +176,12 @@
USE_POLL = implicit
USE_TPROXY = implicit
else
+ifeq ($(TARGET),haiku)
+ # For Haiku
+ TARGET_LDFLAGS = -lnetwork
+ USE_POLL = implicit
+ USE_TPROXY = implicit
+else
ifeq ($(TARGET),linux22)
# This is for Linux 2.2
USE_GETSOCKNAME = implicit
@@ -269,6 +275,7 @@
endif # linux24e
endif # linux24
endif # linux22
+endif # haiku
endif # generic
diff -ur haproxy-1.4.22/src/proto_http.c haproxy-1.4.22-haiku/src/proto_http.c
--- haproxy-1.4.22/src/proto_http.c 2012-08-14 07:09:31.000000000 +0000
+++ haproxy-1.4.22-haiku/src/proto_http.c 2012-12-28 02:09:24.873988096 +0000
@@ -3973,13 +3973,15 @@
int http_send_name_header(struct http_txn *txn, struct http_msg *msg, struct buffer *buf, struct proxy* be, const char* srv_name) {
struct hdr_ctx ctx;
-
+ char *hdr_name = 0;
+ char *hdr_val;
+ int hdr_name_len;
ctx.idx = 0;
- char *hdr_name = be->server_id_hdr_name;
- int hdr_name_len = be->server_id_hdr_len;
+ hdr_name = be->server_id_hdr_name;
+ hdr_name_len = be->server_id_hdr_len;
- char *hdr_val;
+
while (http_find_header2(hdr_name, hdr_name_len, msg->sol, &txn->hdr_idx, &ctx)) {
/* remove any existing values from the header */