git: d4a8c16f3c4b - main - net/haproxy: fix build on recent -current.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 02 Mar 2024 17:38:22 UTC
The branch main has been updated by demon: URL: https://cgit.FreeBSD.org/ports/commit/?id=d4a8c16f3c4b322708444d6f245d15d12bfc5c8b commit d4a8c16f3c4b322708444d6f245d15d12bfc5c8b Author: Dmitry Sivachenko <demon@FreeBSD.org> AuthorDate: 2024-03-02 17:37:03 +0000 Commit: Dmitry Sivachenko <demon@FreeBSD.org> CommitDate: 2024-03-02 17:38:16 +0000 net/haproxy: fix build on recent -current. Submitted by: brooks --- net/haproxy-devel/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ net/haproxy/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ net/haproxy25/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ net/haproxy26/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ net/haproxy27/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ net/haproxy28/files/patch-src_tools.c | 32 +++++++++++++++++++++++++++++++ 6 files changed, 192 insertions(+) diff --git a/net/haproxy-devel/files/patch-src_tools.c b/net/haproxy-devel/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy-devel/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { diff --git a/net/haproxy/files/patch-src_tools.c b/net/haproxy/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { diff --git a/net/haproxy25/files/patch-src_tools.c b/net/haproxy25/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy25/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { diff --git a/net/haproxy26/files/patch-src_tools.c b/net/haproxy26/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy26/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { diff --git a/net/haproxy27/files/patch-src_tools.c b/net/haproxy27/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy27/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { diff --git a/net/haproxy28/files/patch-src_tools.c b/net/haproxy28/files/patch-src_tools.c new file mode 100644 index 000000000000..598f50cbe965 --- /dev/null +++ b/net/haproxy28/files/patch-src_tools.c @@ -0,0 +1,32 @@ +--- src/tools.c.orig ++++ src/tools.c +@@ -17,9 +17,7 @@ + #endif + + #if defined(__FreeBSD__) +-#include <elf.h> +-#include <dlfcn.h> +-extern void *__elf_aux_vector; ++#include <sys/auxv.h> + #endif + + #if defined(__NetBSD__) +@@ -5018,13 +5016,11 @@ + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) +- Elf_Auxinfo *auxv; +- for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { +- if (auxv->a_type == AT_EXECPATH) { +- ret = (const char *)auxv->a_un.a_ptr; +- break; +- } +- } ++ static char execpath[MAXPATHLEN]; ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) {