From nobody Tue Apr 02 12:39:10 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V86rb01y6z5GWDL; Tue, 2 Apr 2024 12:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V86rZ6fWVz4tPr; Tue, 2 Apr 2024 12:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712061550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYfIsttXEY60v33535I/Kga452XIbEOkGHEiV6Uj7XI=; b=vCavOtnaC5OXMXiTs3Xou/TdqtTe5jRVCQ3uFF2Mvd9VQro4wiqPfQ6UhZSJ/PZSok+vnq hL7X2Jb5y4jrPEP8PzOTksT5W4d6RnWRQhO+IeWb1wipRlCFqcV2rvHk1PSwgR2a6bV/xx k7xQgDFIBJ6EYrl6c6EajcTElj+WvulWxEkY13VbBXVWV3806HPmIsSNj4lj1OcZXh/Uiq 9yNlzMFP3qihpZFQ0vG657ztojzOY3xUYwCyMN6O6RfXo/w9hWH8zdvqJqwZxb/ByT2Iu4 Zq5yJk3PCyKA66OH+EzUPatTaZkGwfCAjtI6SWUg2fWCdSXjP6i/MnVWo3kVSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712061550; a=rsa-sha256; cv=none; b=Mnctor1aiIcb2RFQKQf7O5IPuss62yNsoxNx/CiocsDFnQgix+pnmX0nGjBA3SUGV1woAA zwk3oMwlAUeIZv9hKF4oGJJLZOyw6vk07PYuOw544tdqaeblmvqx6CjbM4uphAuYX04WIn yxtcafnSlo1JE6xv+SA2fAg+5XebaK7qQ9aaYzN/IwYvYrWOZCFyPmNEtH4WOKNg3Uv8vd qT+NDjMest5i87LccZU4srBldbM2YSIIc9ekCoeFwVUiYA1Ae00fYFfSKS7t6u9v/Et7kt +3jWgPQbiYSMSg8DNDcYH5QnTl6MTfHJSMB7zI7GqUB8VmfDZvDAtFtH2+WPvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712061550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYfIsttXEY60v33535I/Kga452XIbEOkGHEiV6Uj7XI=; b=LUdSaXar0C2CntMTL1eA9nOqNdxwzMaud/VePW9IbFQu129s+hh76OtCmmUZGgSi7oDBU1 Tk9ymleEAbQqpy7Tr7R7Ykpgx1ogPfTON6go7Ls34fAMoIWv3UzsY3Qpq/jiich6u7DccY D8CSjnBWkBm+rJCltS2SDiwkVI9KiTMtYqbjk3KvIk57AyHV2fAuvuKyHaTcnSzT4BhIc0 CowmNVfPcUvfQ6Jaio/dROROYUa0KTtuoh5meULTd1icSJTubfk3ka6fDTfnt64UPvlVM3 MSpF1AMBW1JSrcn6ErRRjGK53D8i+UYAXxrFyY6D/8C13Asg6khs1hltRs5LRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V86rZ5qtLzpyB; Tue, 2 Apr 2024 12:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 432CdAEB087005; Tue, 2 Apr 2024 12:39:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 432CdAZZ087002; Tue, 2 Apr 2024 12:39:10 GMT (envelope-from git) Date: Tue, 2 Apr 2024 12:39:10 GMT Message-Id: <202404021239.432CdAZZ087002@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Sivachenko Subject: git: ef938192d7bf - main - net/haproxy: fix build on recent -current. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: demon X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef938192d7bf62f742efe506316ac5b860cfc4d7 Auto-Submitted: auto-generated The branch main has been updated by demon: URL: https://cgit.FreeBSD.org/ports/commit/?id=ef938192d7bf62f742efe506316ac5b860cfc4d7 commit ef938192d7bf62f742efe506316ac5b860cfc4d7 Author: Dmitry Sivachenko AuthorDate: 2024-04-02 12:27:32 +0000 Commit: Dmitry Sivachenko CommitDate: 2024-04-02 12:39:03 +0000 net/haproxy: fix build on recent -current. Submitted by: brooks --- net/haproxy24/files/patch-src-tools.c | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/net/haproxy24/files/patch-src-tools.c b/net/haproxy24/files/patch-src-tools.c new file mode 100644 index 000000000000..ebdf24de0fc0 --- /dev/null +++ b/net/haproxy24/files/patch-src-tools.c @@ -0,0 +1,62 @@ +From c03a02388257e21810c534d50a93658e61a83494 Mon Sep 17 00:00:00 2001 +From: Brooks Davis +Date: Wed, 28 Feb 2024 18:12:40 +0000 +Subject: [PATCH] MINOR: tools: use public interface for FreeBSD + get_exec_path() + +Where possible (FreeBSD 13+), use the public, documented interface to +the ELF auxiliary argument vector: elf_aux_info(). + +__elf_aux_vector is a private interface exported so that the runtime +linker can set its value during process startup and not intended for +public consumption. In FreeBSD 15 it has been removed from libc and +moved to libsys. +--- + src/tools.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/tools.c b/src/tools.c +index e1ba241..4759222 100644 +--- src/tools.c ++++ src/tools.c +@@ -17,9 +17,14 @@ + #endif + + #if defined(__FreeBSD__) ++#include ++#if __FreeBSD_version < 1300058 + #include + #include + extern void *__elf_aux_vector; ++#else ++#include ++#endif + #endif + + #if defined(__NetBSD__) +@@ -5018,6 +5023,7 @@ const char *get_exec_path() + if (execfn && execfn != ENOENT) + ret = (const char *)execfn; + #elif defined(__FreeBSD__) ++#if __FreeBSD_version < 1300058 + Elf_Auxinfo *auxv; + for (auxv = __elf_aux_vector; auxv->a_type != AT_NULL; ++auxv) { + if (auxv->a_type == AT_EXECPATH) { +@@ -5025,6 +5031,14 @@ const char *get_exec_path() + break; + } + } ++#else ++ static char execpath[MAXPATHLEN]; ++ ++ if (execpath[0] == '\0') ++ elf_aux_info(AT_EXECPATH, execpath, MAXPATHLEN); ++ if (execpath[0] != '\0') ++ ret = execpath; ++#endif + #elif defined(__NetBSD__) + AuxInfo *auxv; + for (auxv = _dlauxinfo(); auxv->a_type != AT_NULL; ++auxv) { +-- +1.7.10.4 +