- From bfb666becfd3741bcafcdf8a364e23913cf0661c Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Wed, 16 Oct 2024 16:16:33 +0200
- Subject: [PATCH 1/2] tests: Fix Cygwin < 3.5.x compatibility in nfsbuildtest
- Fix Cygwin < 3.5.x compatibility in nfsbuildtest
- Reported-by: Mark Liam Brown <brownmarkliam@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/nfsbuildtest/nfsbuildtest.ksh93 | 54 +++++++++++++++++++++++++--
- 1 file changed, 50 insertions(+), 4 deletions(-)
- diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
- index e5cb613..15c3c6b 100644
- --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
- +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
- @@ -201,6 +201,10 @@ function bash_build
- set -o errexit
- set -o nounset
- + compound cygwin_vers
- +
- + get_cpv_cygwin_version cygwin_vers
- +
- #
- # build config
- #
- @@ -299,7 +303,11 @@ function bash_build
- #
- # build bash
- #
- - time ksh93 -c 'export SHELL=/bin/ksh93 ; bmake -j8'
- + if (( (cygwin_vers.major*1000+cygwin_vers.minor) >= 3005 )) ; then
- + time ksh93 -c 'export SHELL=/bin/ksh93 ; bmake -j8'
- + else
- + time ksh93 -c 'export SHELL=/bin/ksh93 ; make -j8'
- + fi
- echo $?
- echo "#Done."
- @@ -424,6 +432,32 @@ function msnfs41client_clean
- }
- +#
- +# get_cpv_cygwin_version - get cygwin version as compound var
- +#
- +function get_cpv_cygwin_version
- +{
- + nameref c_vers=$1
- + typeset uname_r="${ uname -r ; }"
- + typeset leftover
- +
- + leftover="${uname_r/~(Elr)([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-([[:digit:]]+)\..+/x}"
- +
- + if [[ "$leftover" != 'x' ]] ; then
- + print -u2 -f $"%s: error parsing uname -r for Cygwin version number, got %q\n" \
- + "$0" "$leftover"
- + return 1
- + fi
- +
- + integer c_vers.major="${.sh.match[1]}"
- + integer c_vers.minor="${.sh.match[2]}"
- + integer c_vers.revision="${.sh.match[3]}"
- + integer c_vers.relcount="${.sh.match[4]}"
- +
- + return 0
- +}
- +
- +
- #
- # Enumerate installed Cygwin packages and fill
- # an associative array with the package names
- @@ -431,9 +465,10 @@ function msnfs41client_clean
- function enumerate_cygwin_packages
- {
- nameref package_arr=$1
- - typeset i
- + typeset i j
- - /usr/bin/cygcheck -n | while read i ; do
- + # cygcheck in Cygwin 3.3 does not support -n
- + /usr/bin/cygcheck -c -d | while read i j ; do
- package_arr["$i"]='true'
- done
- return 0
- @@ -463,6 +498,9 @@ function main
- integer errc=0 # error counter
- typeset target="$1"
- typeset subcmd="$2"
- + compound cygwin_vers
- +
- + get_cpv_cygwin_version cygwin_vers
- enumerate_cygwin_packages icp
- @@ -501,7 +539,14 @@ function main
- is_cygwin_pkg_installed icp 'git' || (( errc++ ))
- is_cygwin_pkg_installed icp 'gcc-core' || (( errc++ ))
- is_cygwin_pkg_installed icp 'gcc-g++' || (( errc++ ))
- - is_cygwin_pkg_installed icp 'bmake' || (( errc++ ))
- + if (( (cygwin_vers.major*1000+cygwin_vers.minor) >= 3005 )) ; then
- + print '# bash_build: Using Cygwin >= 3.5 config'
- + # Only Cygwin >= 3.5 has /usr/bin/bmake
- + is_cygwin_pkg_installed icp 'bmake' || (( errc++ ))
- + else
- + print '# bash_build: Using Cygwin < 3.5 config'
- + is_cygwin_pkg_installed icp 'make' || (( errc++ ))
- + fi
- is_cygwin_pkg_installed icp 'libncurses-devel' || (( errc++ ))
- (( errc > 0 )) && return 1
- bash_build
- @@ -551,6 +596,7 @@ function main
- #
- builtin id
- builtin mkdir
- +builtin uname
- main "$@"
- return $?
- --
- 2.45.1
- From 93e4d53a68d5eb8dab3b5f6ff406aea4036a9405 Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Wed, 16 Oct 2024 16:46:34 +0200
- Subject: [PATCH 2/2] daemon: Fix ReactOS/clang build failure in
- get_client_for_netaddr()
- Fix ReactOS/clang build failure in get_client_for_netaddr()
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/nfs41_rpc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/nfs41_rpc.c b/daemon/nfs41_rpc.c
- index 0c7f861..f932de2 100644
- --- a/daemon/nfs41_rpc.c
- +++ b/daemon/nfs41_rpc.c
- @@ -66,7 +66,7 @@ static int get_client_for_netaddr(
- }
- DPRINTF(1, ("callback function 0x%p args 0x%p\n", nfs41_handle_callback, rpc));
- client = clnt_tli_create(RPC_ANYFD, nconf, addr, NFS41_RPC_PROGRAM,
- - NFS41_RPC_VERSION, wsize, rsize, rpc ? proc_cb_compound_res : NULL,
- + NFS41_RPC_VERSION, wsize, rsize, rpc ? (int (*)(void*, void*))proc_cb_compound_res : NULL,
- rpc ? nfs41_handle_callback : NULL, rpc ? rpc : NULL);
- if (client) {
- *client_out = client;
- --
- 2.45.1
msnfs41client: Patches for nfsbuildtest Cygwin < 3.5 compat+ReactOS/clang build failure, 2024-10-16
Posted by Anonymous on Wed 16th Oct 2024 16:08
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.