File ntsync-envvar-disable.patch of Package wine
Makes ntsync easily disabled with the env var WINE_NO_NTSYNC.
For easier testing.
diff --git a/server/inproc_sync.c b/server/inproc_sync.c
index 66d3fcc..d9255a4 100644
--- a/server/inproc_sync.c
+++ b/server/inproc_sync.c
@@ -48,7 +48,14 @@
int get_inproc_device_fd(void)
{
static int fd = -2;
- if (fd == -2) fd = open( "/dev/ntsync", O_CLOEXEC | O_RDONLY );
+ if (fd == -2)
+ {
+ char *no_ntsync = getenv("WINE_NO_NTSYNC");
+ if (no_ntsync != NULL && no_ntsync[0] != '0')
+ fd = -1;
+ else
+ fd = open( "/dev/ntsync", O_CLOEXEC | O_RDONLY );
+ }
return fd;
}