Files
macports-ports/net/haproxy/files/patch-older_systems.diff

51 lines
1.5 KiB
Diff

# https://trac.macports.org/ticket/65699
--- include/haproxy/compat.h.orig 2022-08-19 23:29:02.000000000 +0800
+++ include/haproxy/compat.h 2022-08-20 23:13:25.000000000 +0800
@@ -281,13 +281,18 @@
/* macOS has a call similar to malloc_usable_size */
#if defined(__APPLE__)
+#include <AvailabilityMacros.h>
#include <malloc/malloc.h>
#define malloc_usable_size malloc_size
+#if MAC_OS_X_VERSION_MIN_REQUIRED > 1060
#define HA_HAVE_MALLOC_ZONE
+#endif
#define TCP_KEEPIDLE TCP_KEEPALIVE
+#if MAC_OS_X_VERSION_MIN_REQUIRED > 101003
#define TCP_INFO TCP_CONNECTION_INFO
#define tcp_info tcp_connection_info
#endif
+#endif
/* Max number of file descriptors we send in one sendmsg(). Linux seems to be
* able to send 253 fds per sendmsg(), however musl is limited to 252, not sure
# https://trac.macports.org/ticket/66621
--- include/haproxy/openssl-compat.h.orig 2022-12-19 22:46:54.000000000 +0700
+++ include/haproxy/openssl-compat.h 2023-01-04 20:31:17.000000000 +0700
@@ -91,6 +91,9 @@
#define HAVE_SSL_KEYLOG
#endif
+#if !defined(__cplusplus)
+#define static_assert _Static_assert
+#endif
#if (HA_OPENSSL_VERSION_NUMBER >= 0x3000000fL)
#define HAVE_OSSL_PARAM
--- include/import/xxhash.h.orig 2022-12-19 22:46:54.000000000 +0700
+++ include/import/xxhash.h 2023-01-04 21:22:05.000000000 +0700
@@ -76,6 +76,10 @@
XXH32 6.8 GB/s 6.0 GB/s
*/
+#if !defined(__cplusplus)
+#define static_assert _Static_assert
+#endif
+
#if defined (__cplusplus)
extern "C" {
#endif