pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for fixing git bundle generation+do not use deprecated |ExAllocatePoolWithTag()|, 2024-10-15
Posted by Anonymous on Tue 15th Oct 2024 17:01
raw | new post

  1. From 84160fbf698ea9b002cdb926e3c3f4bd1bd141bf Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Tue, 15 Oct 2024 16:19:28 +0200
  4. Subject: [PATCH 1/2] cygwin: Fix git bundle generation on network filesystems
  5.  
  6. Fix git bundle generation on network filesystems
  7.  
  8. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  9. ---
  10. cygwin/Makefile.install | 1 +
  11.  1 file changed, 1 insertion(+)
  12.  
  13. diff --git a/cygwin/Makefile.install b/cygwin/Makefile.install
  14. index dee542c..438475b 100644
  15. --- a/cygwin/Makefile.install
  16. +++ b/cygwin/Makefile.install
  17. @@ -54,6 +54,7 @@ installdest:
  18.         (cd "$(DESTDIR)/$(CYGWIN_BASEPATH)/sbin/" && ln -sf ../lib/msnfs41client/msnfs41client .)
  19.         cp $(PROJECT_BASEDIR_DIR)/cygwin_idmapper.ksh           $(DESTDIR)/$(CYGWIN_BASEPATH)/lib/msnfs41client/.
  20.         @ printf "# Package sources and diffs\n"
  21. +       git config --global --add safe.directory "$(PROJECT_BASEDIR_DIR)"
  22.         git bundle create "$(DESTDIR)/$(CYGWIN_BASEPATH)/usr/src/msnfs41client/msnfs41client_git.bundle" HEAD
  23.         git diff -w     >"$(DESTDIR)/$(CYGWIN_BASEPATH)/usr/src/msnfs41client/msnfs41client_diff_w.diff"
  24.         git diff        >"$(DESTDIR)/$(CYGWIN_BASEPATH)/usr/src/msnfs41client/msnfs41client_diff.diff"
  25. --
  26. 2.45.1
  27.  
  28. From 70ddd7760643f3186b9834ade60aad967f72ed28 Mon Sep 17 00:00:00 2001
  29. From: Roland Mainz <roland.mainz@nrubsig.org>
  30. Date: Tue, 15 Oct 2024 17:29:35 +0200
  31. Subject: [PATCH 2/2] sys: Add workaround for |RxAllocatePoolWithTag()| using
  32.  deprecated |ExAllocatePoolWithTag()|
  33.  
  34. Add workaround for |RxAllocatePoolWithTag()| using |ExAllocatePoolWithTag()|,
  35. which is deprecated in the Win11 WDK ("warning C4996: 'ExAllocatePoolWithTag':
  36. ExAllocatePoolWithTag is deprecated, use ExAllocatePool2.").
  37.  
  38. The workaround redefines |RxAllocatePoolWithTag()| with a version
  39. which uses |ExAllocatePool2()|.
  40.  
  41. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  42. ---
  43. sys/nfs41sys_driver.h | 21 +++++++++++++++++++++
  44.  1 file changed, 21 insertions(+)
  45.  
  46. diff --git a/sys/nfs41sys_driver.h b/sys/nfs41sys_driver.h
  47. index 67d5a29..ab52fb8 100644
  48. --- a/sys/nfs41sys_driver.h
  49. +++ b/sys/nfs41sys_driver.h
  50. @@ -33,6 +33,27 @@
  51.  
  52.  #include "nfs_ea.h"
  53.  
  54. +#define EXALLOCATEPOOLWITHTAG_DEPRECATED 1
  55. +
  56. +#ifdef EXALLOCATEPOOLWITHTAG_DEPRECATED
  57. +/*
  58. + * Workaround for WDK11 issue: |ExAllocatePoolWithTag()| is
  59. + * deprecated ('warning C4996: 'ExAllocatePoolWithTag':"
  60. + * ExAllocatePoolWithTag is deprecated, use ExAllocatePool2.')
  61. + * but |RxAllocatePoolWithTag()| is still mapped to
  62. + * |ExAllocatePoolWithTag()|
  63. + */
  64. +#undef RxAllocatePoolWithTag
  65. +#define RXALLOCATEPOOL_DEFAULT_ALLOCATEPOOL2FLAGS \
  66. +    (POOL_FLAG_UNINITIALIZED|POOL_FLAG_CACHE_ALIGNED)
  67. +
  68. +#define RxAllocatePoolWithTag(rxallocpool, numbytes, tag) \
  69. +    ExAllocatePool2(((((rxallocpool) == NonPagedPoolNx)? \
  70. +            POOL_FLAG_NON_PAGED:POOL_FLAG_NON_PAGED_EXECUTE) | \
  71. +            RXALLOCATEPOOL_DEFAULT_ALLOCATEPOOL2FLAGS), \
  72. +        (numbytes), (tag))
  73. +#endif /* EXALLOCATEPOOLWITHTAG_DEPRECATED */
  74. +
  75.  #define DECLARE_CONST_ANSI_STRING(_var, _string) \
  76.      const CHAR _var ## _buffer[] = _string; \
  77.      const ANSI_STRING _var = { sizeof(_string) - sizeof(CHAR), \
  78. --
  79. 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