pipelight: Add patch for wine 6.13 compatibility

Wine 6.13 introduces a function argument named 'new' to a header file.
This confuses the C++ compiler.

+46 -1
+4 -1
pkgs/tools/misc/pipelight/default.nix
··· 21 22 NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; 23 24 - patches = [ ./pipelight.patch ]; 25 26 configurePhase = '' 27 patchShebangs .
··· 21 22 NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; 23 24 + patches = [ 25 + ./pipelight.patch 26 + ./wine-6.13-new-args.patch 27 + ]; 28 29 configurePhase = '' 30 patchShebangs .
+42
pkgs/tools/misc/pipelight/wine-6.13-new-args.patch
···
··· 1 + diff --git a/src/windows/pluginloader/apihook.c b/src/windows/pluginloader/apihook.c 2 + index 80bf726..6b80f70 100644 3 + --- a/src/windows/pluginloader/apihook.c 4 + +++ b/src/windows/pluginloader/apihook.c 5 + @@ -42,7 +42,9 @@ 6 + #include "common/common.h" 7 + #include "pluginloader.h" 8 + 9 + +#define new cnew 10 + #include <windows.h> // for PVOID and other types 11 + +#undef new 12 + #include <string.h> // for memset 13 + 14 + void* patchDLLExport(PVOID ModuleBase, const char* functionName, void* newFunctionPtr){ 15 + diff --git a/src/windows/pluginloader/npnfunctions.c b/src/windows/pluginloader/npnfunctions.c 16 + index e4e38aa..19f29d5 100644 17 + --- a/src/windows/pluginloader/npnfunctions.c 18 + +++ b/src/windows/pluginloader/npnfunctions.c 19 + @@ -41,7 +41,9 @@ 20 + #include "common/common.h" 21 + #include "pluginloader.h" 22 + 23 + +#define new cnew 24 + #include <windows.h> 25 + +#undef new 26 + 27 + /* Shockwave sometimes calls the function with a wrong instance? Is this a wine bug? */ 28 + NPP shockwaveInstanceBug = NULL; 29 + diff --git a/src/windows/pluginloader/pluginloader.c b/src/windows/pluginloader/pluginloader.c 30 + index 8f1170a..99dbceb 100644 31 + --- a/src/windows/pluginloader/pluginloader.c 32 + +++ b/src/windows/pluginloader/pluginloader.c 33 + @@ -50,7 +50,9 @@ 34 + #include "pluginloader.h" 35 + #include "apihook.h" 36 + 37 + +#define new cnew 38 + #include <windows.h> 39 + +#undef new 40 + #include <objbase.h> // for CoInitializeEx 41 + #include <GL/gl.h> 42 +