[arch-commits] Commit in haproxy/trunk (PKGBUILD gcc6-fix.patch)
Johannes Löthberg
demize at archlinux.org
Thu May 19 22:54:29 UTC 2016
Date: Friday, May 20, 2016 @ 00:54:29
Author: demize
Revision: 175741
upgpkg: haproxy 1.6.5-3
Build with patch to fix build under gcc6
Added:
haproxy/trunk/gcc6-fix.patch
Modified:
haproxy/trunk/PKGBUILD
----------------+
PKGBUILD | 10 +++--
gcc6-fix.patch | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-05-19 22:26:22 UTC (rev 175740)
+++ PKGBUILD 2016-05-19 22:54:29 UTC (rev 175741)
@@ -4,7 +4,7 @@
pkgname=haproxy
pkgver=1.6.5
-pkgrel=2
+pkgrel=3
pkgdesc='Reliable, high performance TCP/HTTP load balancer'
url='http://haproxy.org/'
@@ -18,14 +18,17 @@
install=haproxy.install
source=(http://haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz
- haproxy.cfg)
+ haproxy.cfg
+ gcc6-fix.patch)
md5sums=('5290f278c04e682e42ab71fed26fc082'
- '02241a8ca257d12f7eb131e2d7da3f3b')
+ '02241a8ca257d12f7eb131e2d7da3f3b'
+ 'c4b4fba82b6f33270ed57514ed3f53e8')
prepare() {
cd haproxy-$pkgver
sed -i 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c
+ patch -p1 -i "$srcdir"/gcc6-fix.patch
}
build() {
@@ -32,7 +35,6 @@
cd haproxy-$pkgver
make CPU=generic TARGET=linux2628 \
- SPEC_CFLAGS="-fno-strict-aliasing -Wdeclaration-after-statement -fno-tree-sra" \
USE_GETADDRINFO=1 \
USE_OPENSSL=1 \
USE_PCRE=1 USE_PCRE_JIT=1 \
Added: gcc6-fix.patch
===================================================================
--- gcc6-fix.patch (rev 0)
+++ gcc6-fix.patch 2016-05-19 22:54:29 UTC (rev 175741)
@@ -0,0 +1,107 @@
+diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h
+index 4d8f5365b625..0aa6643b98da 100644
+--- a/include/proto/proto_http.h
++++ b/include/proto/proto_http.h
+@@ -110,7 +110,7 @@ void http_set_status(unsigned int status, struct stream *s);
+ int http_transform_header_str(struct stream* s, struct http_msg *msg, const char* name,
+ unsigned int name_len, const char *str, struct my_regex *re,
+ int action);
+-void inet_set_tos(int fd, struct sockaddr_storage from, int tos);
++void inet_set_tos(int fd, const struct sockaddr_storage *from, int tos);
+ void http_perform_server_redirect(struct stream *s, struct stream_interface *si);
+ void http_return_srv_error(struct stream *s, struct stream_interface *si);
+ void http_capture_bad_message(struct error_snapshot *es, struct stream *s,
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index 3fee54e0db1d..48e584cf73e7 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -287,7 +287,7 @@ int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf,
+ }
+
+ /* OK the address looks correct */
+- ss = *ss2;
++ memcpy(&ss, ss2, sizeof(ss));
+
+ for (; port <= end; port++) {
+ l = calloc(1, sizeof(*l));
+diff --git a/src/connection.c b/src/connection.c
+index 330f3efbc995..5515188c6b10 100644
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -744,7 +744,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
+ const char pp2_signature[] = PP2_SIGNATURE;
+ int ret = 0;
+ struct proxy_hdr_v2 *hdr = (struct proxy_hdr_v2 *)buf;
+- struct sockaddr_storage null_addr = {0};
++ struct sockaddr_storage null_addr = { .ss_family = 0 };
+ struct sockaddr_storage *src = &null_addr;
+ struct sockaddr_storage *dst = &null_addr;
+
+diff --git a/src/hlua.c b/src/hlua.c
+index f6eb8aa80ee0..94f97429c895 100644
+--- a/src/hlua.c
++++ b/src/hlua.c
+@@ -4781,7 +4781,7 @@ __LJMP static int hlua_txn_set_tos(lua_State *L)
+ tos = MAY_LJMP(luaL_checkinteger(L, 2));
+
+ if ((cli_conn = objt_conn(htxn->s->sess->origin)) && conn_ctrl_ready(cli_conn))
+- inet_set_tos(cli_conn->t.sock.fd, cli_conn->addr.from, tos);
++ inet_set_tos(cli_conn->t.sock.fd, &cli_conn->addr.from, tos);
+
+ return 0;
+ }
+diff --git a/src/proto_http.c b/src/proto_http.c
+index 21ad131c9f43..416504247a8d 100644
+--- a/src/proto_http.c
++++ b/src/proto_http.c
+@@ -3189,15 +3189,15 @@ int http_handle_stats(struct stream *s, struct channel *req)
+ /* Sets the TOS header in IPv4 and the traffic class header in IPv6 packets
+ * (as per RFC3260 #4 and BCP37 #4.2 and #5.2).
+ */
+-void inet_set_tos(int fd, struct sockaddr_storage from, int tos)
++void inet_set_tos(int fd, const struct sockaddr_storage *from, int tos)
+ {
+ #ifdef IP_TOS
+- if (from.ss_family == AF_INET)
++ if (from->ss_family == AF_INET)
+ setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
+ #endif
+ #ifdef IPV6_TCLASS
+- if (from.ss_family == AF_INET6) {
+- if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&from)->sin6_addr))
++ if (from->ss_family == AF_INET6) {
++ if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)from)->sin6_addr))
+ /* v4-mapped addresses need IP_TOS */
+ setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
+ else
+@@ -3363,7 +3363,7 @@ resume_execution:
+
+ case ACT_HTTP_SET_TOS:
+ if ((cli_conn = objt_conn(sess->origin)) && conn_ctrl_ready(cli_conn))
+- inet_set_tos(cli_conn->t.sock.fd, cli_conn->addr.from, rule->arg.tos);
++ inet_set_tos(cli_conn->t.sock.fd, &cli_conn->addr.from, rule->arg.tos);
+ break;
+
+ case ACT_HTTP_SET_MARK:
+@@ -3646,7 +3646,7 @@ resume_execution:
+
+ case ACT_HTTP_SET_TOS:
+ if ((cli_conn = objt_conn(sess->origin)) && conn_ctrl_ready(cli_conn))
+- inet_set_tos(cli_conn->t.sock.fd, cli_conn->addr.from, rule->arg.tos);
++ inet_set_tos(cli_conn->t.sock.fd, &cli_conn->addr.from, rule->arg.tos);
+ break;
+
+ case ACT_HTTP_SET_MARK:
+diff --git a/src/proto_tcp.c b/src/proto_tcp.c
+index a44912af4654..bbe12e2d4c0d 100644
+--- a/src/proto_tcp.c
++++ b/src/proto_tcp.c
+@@ -435,7 +435,7 @@ int tcp_connect_server(struct connection *conn, int data, int delack)
+ struct sockaddr_storage sa;
+
+ ret = 1;
+- sa = src->source_addr;
++ memcpy(&sa, &src->source_addr, sizeof(sa));
+
+ do {
+ /* note: in case of retry, we may have to release a previously
More information about the arch-commits
mailing list