pastebin - collaborative debugging tool
rovema.kpaste.net RSS


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

  1. From bfb666becfd3741bcafcdf8a364e23913cf0661c Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Wed, 16 Oct 2024 16:16:33 +0200
  4. Subject: [PATCH 1/2] tests: Fix Cygwin < 3.5.x compatibility in nfsbuildtest
  5.  
  6. Fix Cygwin < 3.5.x compatibility in nfsbuildtest
  7.  
  8. Reported-by: Mark Liam Brown <brownmarkliam@gmail.com>
  9. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  10. ---
  11. tests/nfsbuildtest/nfsbuildtest.ksh93 | 54 +++++++++++++++++++++++++--
  12.  1 file changed, 50 insertions(+), 4 deletions(-)
  13.  
  14. diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
  15. index e5cb613..15c3c6b 100644
  16. --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
  17. +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
  18. @@ -201,6 +201,10 @@ function bash_build
  19.         set -o errexit
  20.         set -o nounset
  21.  
  22. +       compound cygwin_vers
  23. +
  24. +       get_cpv_cygwin_version cygwin_vers
  25. +
  26.         #
  27.         # build config
  28.         #
  29. @@ -299,7 +303,11 @@ function bash_build
  30.         #
  31.         # build bash
  32.         #
  33. -       time ksh93 -c 'export SHELL=/bin/ksh93 ; bmake -j8'
  34. +       if (( (cygwin_vers.major*1000+cygwin_vers.minor) >= 3005 )) ; then
  35. +               time ksh93 -c 'export SHELL=/bin/ksh93 ; bmake -j8'
  36. +       else
  37. +               time ksh93 -c 'export SHELL=/bin/ksh93 ; make -j8'
  38. +       fi
  39.         echo $?
  40.  
  41.         echo "#Done."
  42. @@ -424,6 +432,32 @@ function msnfs41client_clean
  43.  }
  44.  
  45.  
  46. +#
  47. +# get_cpv_cygwin_version - get cygwin version as compound var
  48. +#
  49. +function get_cpv_cygwin_version
  50. +{
  51. +       nameref c_vers=$1
  52. +       typeset uname_r="${ uname -r ; }"
  53. +       typeset leftover
  54. +
  55. +       leftover="${uname_r/~(Elr)([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)-([[:digit:]]+)\..+/x}"
  56. +
  57. +       if [[ "$leftover" != 'x' ]] ; then
  58. +               print -u2 -f $"%s: error parsing uname -r for Cygwin version number, got %q\n" \
  59. +                       "$0" "$leftover"
  60. +               return 1
  61. +       fi
  62. +
  63. +       integer c_vers.major="${.sh.match[1]}"
  64. +       integer c_vers.minor="${.sh.match[2]}"
  65. +       integer c_vers.revision="${.sh.match[3]}"
  66. +       integer c_vers.relcount="${.sh.match[4]}"
  67. +
  68. +       return 0
  69. +}
  70. +
  71. +
  72.  #
  73.  # Enumerate installed Cygwin packages and fill
  74.  # an associative array with the package names
  75. @@ -431,9 +465,10 @@ function msnfs41client_clean
  76.  function enumerate_cygwin_packages
  77.  {
  78.         nameref package_arr=$1
  79. -       typeset i
  80. +       typeset i j
  81.  
  82. -       /usr/bin/cygcheck -n | while read i ; do
  83. +       # cygcheck in Cygwin 3.3 does not support -n
  84. +       /usr/bin/cygcheck -c -d | while read i j ; do
  85.                 package_arr["$i"]='true'
  86.         done
  87.         return 0
  88. @@ -463,6 +498,9 @@ function main
  89.         integer errc=0 # error counter
  90.         typeset target="$1"
  91.         typeset subcmd="$2"
  92. +       compound cygwin_vers
  93. +
  94. +       get_cpv_cygwin_version cygwin_vers
  95.  
  96.         enumerate_cygwin_packages icp
  97.  
  98. @@ -501,7 +539,14 @@ function main
  99.                         is_cygwin_pkg_installed icp 'git' || (( errc++ ))
  100.                         is_cygwin_pkg_installed icp 'gcc-core' || (( errc++ ))
  101.                         is_cygwin_pkg_installed icp 'gcc-g++' || (( errc++ ))
  102. -                       is_cygwin_pkg_installed icp 'bmake' || (( errc++ ))
  103. +                       if (( (cygwin_vers.major*1000+cygwin_vers.minor) >= 3005 )) ; then
  104. +                               print '# bash_build: Using Cygwin >= 3.5 config'
  105. +                               # Only Cygwin >= 3.5 has /usr/bin/bmake
  106. +                               is_cygwin_pkg_installed icp 'bmake' || (( errc++ ))
  107. +                       else
  108. +                               print '# bash_build: Using Cygwin < 3.5 config'
  109. +                               is_cygwin_pkg_installed icp 'make' || (( errc++ ))
  110. +                       fi
  111.                         is_cygwin_pkg_installed icp 'libncurses-devel' || (( errc++ ))
  112.                         (( errc > 0 )) && return 1
  113.                         bash_build
  114. @@ -551,6 +596,7 @@ function main
  115.  #
  116.  builtin id
  117.  builtin mkdir
  118. +builtin uname
  119.  
  120.  main "$@"
  121.  return $?
  122. --
  123. 2.45.1
  124.  
  125. From 93e4d53a68d5eb8dab3b5f6ff406aea4036a9405 Mon Sep 17 00:00:00 2001
  126. From: Dan Shelton <dan.f.shelton@gmail.com>
  127. Date: Wed, 16 Oct 2024 16:46:34 +0200
  128. Subject: [PATCH 2/2] daemon: Fix ReactOS/clang build failure in
  129.  get_client_for_netaddr()
  130.  
  131. Fix ReactOS/clang build failure in get_client_for_netaddr()
  132.  
  133. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  134. ---
  135. daemon/nfs41_rpc.c | 2 +-
  136.  1 file changed, 1 insertion(+), 1 deletion(-)
  137.  
  138. diff --git a/daemon/nfs41_rpc.c b/daemon/nfs41_rpc.c
  139. index 0c7f861..f932de2 100644
  140. --- a/daemon/nfs41_rpc.c
  141. +++ b/daemon/nfs41_rpc.c
  142. @@ -66,7 +66,7 @@ static int get_client_for_netaddr(
  143.      }
  144.      DPRINTF(1, ("callback function 0x%p args 0x%p\n", nfs41_handle_callback, rpc));
  145.      client = clnt_tli_create(RPC_ANYFD, nconf, addr, NFS41_RPC_PROGRAM,
  146. -        NFS41_RPC_VERSION, wsize, rsize, rpc ? proc_cb_compound_res : NULL,
  147. +        NFS41_RPC_VERSION, wsize, rsize, rpc ? (int (*)(void*, void*))proc_cb_compound_res : NULL,
  148.          rpc ? nfs41_handle_callback : NULL, rpc ? rpc : NULL);
  149.      if (client) {
  150.          *client_out = client;
  151. --
  152. 2.45.1

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at