diff options
| author | jperkin <jperkin@pkgsrc.org> | 2018-04-05 09:18:39 +0000 |
|---|---|---|
| committer | jperkin <jperkin@pkgsrc.org> | 2018-04-05 09:18:39 +0000 |
| commit | 1c07c44eadb883050bb9c1ccd2c87991e42d58df (patch) | |
| tree | b7b9ff7dfbb49ceb5e521ed291c24717d3c09009 /net/haproxy/patches | |
| parent | aa9edae56784231580965b68a12b68af39b179cd (diff) | |
| download | pkgsrc-1c07c44eadb883050bb9c1ccd2c87991e42d58df.tar.gz | |
haproxy: Rework SunOS XOPEN_SOURCE handling.
This package explicitly avoids C99-isms and fails to build in C99 mode with
older compilers, even though it works fine with newer compilers that default
to C99 mode. So, we need to explicitly request XPG4_2 if and only if the
compiler does not default to C99, and must not require C99.
Diffstat (limited to 'net/haproxy/patches')
| -rw-r--r-- | net/haproxy/patches/patch-Makefile | 6 | ||||
| -rw-r--r-- | net/haproxy/patches/patch-src_cli.c | 16 | ||||
| -rw-r--r-- | net/haproxy/patches/patch-src_haproxy.c | 16 |
3 files changed, 35 insertions, 3 deletions
diff --git a/net/haproxy/patches/patch-Makefile b/net/haproxy/patches/patch-Makefile index cbd8d3cd6b4..5d5629f51c6 100644 --- a/net/haproxy/patches/patch-Makefile +++ b/net/haproxy/patches/patch-Makefile @@ -1,6 +1,6 @@ -$NetBSD: patch-Makefile,v 1.3 2018/02/08 19:12:50 jperkin Exp $ +$NetBSD: patch-Makefile,v 1.4 2018/04/05 09:18:39 jperkin Exp $ -Specify C99. +Do not hardcode _XOPEN_SOURCE. Skip installing unnecessary documentation. --- Makefile.orig 2017-12-30 17:13:19.000000000 +0000 @@ -10,7 +10,7 @@ Skip installing unnecessary documentation. # We also enable getaddrinfo() which works since solaris 8. USE_POLL = implicit - TARGET_CFLAGS = -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -+ TARGET_CFLAGS = -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ ++ TARGET_CFLAGS = -DFD_SETSIZE=65536 -D_REENTRANT -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED=1 TARGET_LDFLAGS = -lnsl -lsocket USE_TPROXY = implicit USE_LIBCRYPT = implicit diff --git a/net/haproxy/patches/patch-src_cli.c b/net/haproxy/patches/patch-src_cli.c new file mode 100644 index 00000000000..d2b4af1c499 --- /dev/null +++ b/net/haproxy/patches/patch-src_cli.c @@ -0,0 +1,16 @@ +$NetBSD: patch-src_cli.c,v 1.1 2018/04/05 09:18:39 jperkin Exp $ + +Special handling for XPG4_2 on SunOS. + +--- src/cli.c.orig 2018-02-08 13:05:15.000000000 +0000 ++++ src/cli.c +@@ -11,6 +11,9 @@ + * + */ + ++#if defined(__sun) && !defined(_XOPEN_SOURCE) && (__STDC_VERSION__-0 < 199901L) ++#define _XOPEN_SOURCE ++#endif + #include <ctype.h> + #include <errno.h> + #include <fcntl.h> diff --git a/net/haproxy/patches/patch-src_haproxy.c b/net/haproxy/patches/patch-src_haproxy.c new file mode 100644 index 00000000000..237c06ea24c --- /dev/null +++ b/net/haproxy/patches/patch-src_haproxy.c @@ -0,0 +1,16 @@ +$NetBSD: patch-src_haproxy.c,v 1.1 2018/04/05 09:18:39 jperkin Exp $ + +Special handling for XPG4_2 on SunOS. + +--- src/haproxy.c.orig 2018-02-08 13:05:15.000000000 +0000 ++++ src/haproxy.c +@@ -26,6 +26,9 @@ + */ + + #define _GNU_SOURCE ++#if defined(__sun) && !defined(_XOPEN_SOURCE) && (__STDC_VERSION__-0 < 199901L) ++#define _XOPEN_SOURCE ++#endif + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> |
