From nobody Wed Oct 02 13:40:50 2024 X-Original-To: dev-commits-ports-branches@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 4XJbYH0r94z5YXZx; Wed, 02 Oct 2024 13:40:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJbYH0M68z4hQY; Wed, 2 Oct 2024 13:40:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727876451; 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=Q9MF6jLL6I2xi0QhsYCEybr9XnV9j/jFEd/HnGM8aVY=; b=HGYYpsnU2MHbYjqTE5ig8Es2yJMRCjROALNKEXxrwnUj3WuLS2C2RHMnd+pydz3DFuVmxE 1luB0xTYus9SxRDlFNSoEGkvAsEN/lHlfdIUBQQ9BV/rBcTntxt0lpYLsB9YC/oANh7OML KM9IdgSoGgPpoIaXPzKaiBeMJG20M4TFWHt/dPt8gTwI8h35eAy15Es5qNmaUr79NKE+Wg 4pnQy3DYWfQor4IWPqjavO+X98X5W0NPTR7TWzF4J8x2xFkDd7Lmff3Olvta6s5SEfE8O0 lXiweZ7ffjj//I1SUrzmpwVTCmLuqFWALdQiZZbHJs4hcTNnNsniZn3bBpUEqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727876451; 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=Q9MF6jLL6I2xi0QhsYCEybr9XnV9j/jFEd/HnGM8aVY=; b=dJqfDj5TWn5c0Bnunt3xQ+EUEu3/Xvfxa7fMEMtrMlPiRyJLKEw0nP8Ug+c8AIbIHPaKp0 6vlDkvAtGDJRuLFWv4gn8vHLwsOuIB5niOc/NGK49y1ZK3PaoDCpexMYH7E8NEa+Pm9SUD BkZTXzA7p9VltP772nUkmAopX5EAWMETrz/LdFHN2uBbdpz/S4SpoULb5/d8vH02sWiUCW K/+0SELvOVUtw1qkJ6RScde1WoOY2NDFHKsw+vtVdQc/Rzzxk/t9ebRzVLZKbzjXKym9Pf K6D+ThKYr0NFq+O83QTmu5obvoaaQW0zPiX1BxnVskZF8CrkT5ROoHpM2ElnNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727876451; a=rsa-sha256; cv=none; b=aYQqmlAWAIe1dcS47HTWTVNOO5GaPtFyyvvK4FABJXdZv5egsbKiPdQ8LFzW6zPWVlkPfk FQ/bk0xL6KBayHPB1W69V15XVcbj4Z7dccTHfGDE10V9zaBST+xYCOfMlDirZhHEUNkPLz VVEqCJS0EtuTPzXTWPWHHN/2cehlQN1oJib0NFaJku59k+QoNk73ZuEwhAb5EQmQ45ZzxZ w1db4hxudcaD2b239BlsKZZUsNdxnWQi2mnub8rV/bsYdgLGD9PTPjFyGscOXjUYggWNRm Q0NDFcgoKYb+e8GEwgViG05iy3N1CW8ce5b/73oRb6TccGinbjBwN/Y5D9pzNQ== 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 4XJbYG6z6dz1Mk9; Wed, 2 Oct 2024 13:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 492DeoLa023019; Wed, 2 Oct 2024 13:40:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492DeoQY023016; Wed, 2 Oct 2024 13:40:50 GMT (envelope-from git) Date: Wed, 2 Oct 2024 13:40:50 GMT Message-Id: <202410021340.492DeoQY023016@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: b06bd45ed252 - 2024Q3 - net/samba416: fix rl_completion_func_t detection and usage List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q3 X-Git-Reftype: branch X-Git-Commit: b06bd45ed2525b5c142860116b6fceb857ea3d2a Auto-Submitted: auto-generated The branch 2024Q3 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=b06bd45ed2525b5c142860116b6fceb857ea3d2a commit b06bd45ed2525b5c142860116b6fceb857ea3d2a Author: Dimitry Andric AuthorDate: 2024-10-02 11:31:20 +0000 Commit: Dimitry Andric CommitDate: 2024-10-02 13:40:28 +0000 net/samba416: fix rl_completion_func_t detection and usage After a recent devel/readline update, net/samba416 fails to compile with clang 19, resulting in errors similar to: ../../libcli/smbreadline/smbreadline.c:139:38: warning: 'CPPFunction' is deprecated [-Wdeprecated-declarations] 139 | rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn; | ^ ../../lib/replace/system/readline.h:50:31: note: expanded from macro 'RL_COMPLETION_CAST' 50 | # define RL_COMPLETION_CAST (CPPFunction *) | ^ /usr/local/include/readline/rltypedefs.h:38:50: note: 'CPPFunction' has been explicitly marked deprecated here 38 | typedef char **CPPFunction (void) __attribute__((deprecated)); | ^ ../../libcli/smbreadline/smbreadline.c:139:36: error: incompatible function pointer types assigning to 'rl_completion_func_t *' (aka 'char **(*)(const char *, int, int)') from 'CPPFunction *' (aka 'char **(*)(void)') [-Wincompatible-function-pointer-types] 139 | rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are two reasons: samba checks for `rl_completion_t`, while the actual readline type is `rl_completion_func_t`, and samba's wrapper `readline.h` header prefers the `CPPFunction` type which is deprecated, while it should use `rl_completion_func_t` instead. Fix the `wscript_configure` check to detect `rl_completion_func_t`, and reverse the `HAVE_RL_COMPLETION_T` and `HAVE_CPPFUNCTION` checks in the wrapper header. PR: 281817 Approved by: samba (0mp) Reviewed by: 0mp MFH: 2024Q3 (cherry picked from commit 48cea5704f4376df85a42c5b145c62f8830c6822) --- net/samba416/Makefile | 1 + .../files/0029-Fix-rl_completion_func_t.patch | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/net/samba416/Makefile b/net/samba416/Makefile index d83f339028f6..f5083d56636a 100644 --- a/net/samba416/Makefile +++ b/net/samba416/Makefile @@ -45,6 +45,7 @@ EXTRA_PATCHES= \ ${PATCHDIR}/0026-vfs-add-a-compatibility-option-to-the-vfs_streams_xa.patch:-p1 \ ${PATCHDIR}/0027-Add-VFS-module-vfs_freebsd-that-implements-FreeBSD-s.patch:-p1 \ ${PATCHDIR}/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch:-p1 \ + ${PATCHDIR}/0029-Fix-rl_completion_func_t.patch:-p1 \ ${PATCHDIR}/0099-s3-modules-zfsacl-fix-get-set-ACL-on-FreeBSD-13.patch:-p1 \ ${PATCHDIR}/0099-s4-mitkdc-Add-support-for-MIT-Kerberos-1.20.patch:-p1 diff --git a/net/samba416/files/0029-Fix-rl_completion_func_t.patch b/net/samba416/files/0029-Fix-rl_completion_func_t.patch new file mode 100644 index 000000000000..67cba786e3f5 --- /dev/null +++ b/net/samba416/files/0029-Fix-rl_completion_func_t.patch @@ -0,0 +1,31 @@ +--- a/lib/replace/system/readline.h 2022-01-24 11:26:58.905306300 +0100 ++++ b/lib/replace/system/readline.h 2024-10-02 12:48:20.110740000 +0200 +@@ -46,10 +46,10 @@ + #endif + + #ifdef HAVE_NEW_LIBREADLINE +-#ifdef HAVE_CPPFUNCTION ++#if defined(HAVE_RL_COMPLETION_FUNC_T) ++# define RL_COMPLETION_CAST (rl_completion_func_t *) ++#elif defined(HAVE_CPPFUNCTION) + # define RL_COMPLETION_CAST (CPPFunction *) +-#elif defined(HAVE_RL_COMPLETION_T) +-# define RL_COMPLETION_CAST (rl_completion_t *) + #else + # define RL_COMPLETION_CAST + #endif +--- a/libcli/smbreadline/wscript_configure 2022-01-24 11:26:58.973306700 +0100 ++++ b/libcli/smbreadline/wscript_configure 2024-10-02 12:48:20.110969000 +0200 +@@ -51,10 +51,10 @@ conf.CHECK_CODE(''' + # endif + # endif + #endif +-int main(void) {rl_completion_t f; return 0;} ++int main(void) {rl_completion_func_t f; return 0;} + ''', + 'HAVE_RL_COMPLETION_FUNC_T', execute=False, addmain=False, +-msg='Checking for rl_completion_t') ++msg='Checking for rl_completion_func_t') + + conf.CHECK_CODE(''' + #ifdef HAVE_READLINE_READLINE_H