aboutsummaryrefslogtreecommitdiff
path: root/emulators/wine-proton/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/wine-proton/files')
-rw-r--r--emulators/wine-proton/files/clang/stdarg.h30
-rw-r--r--emulators/wine-proton/files/clang/stdbool.h34
-rw-r--r--emulators/wine-proton/files/clang/stddef.h128
-rw-r--r--emulators/wine-proton/files/patch-configure.ac33
-rw-r--r--emulators/wine-proton/files/patch-dlls__ntdll__unix__loader.c24
-rw-r--r--emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c24
-rw-r--r--emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c (renamed from emulators/wine-proton/files/patch-dlls__ntdll__unix__signal_x86_64.c)0
-rw-r--r--emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c23
-rw-r--r--emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c50
-rw-r--r--emulators/wine-proton/files/patch-dlls_wineoss.drv_oss.c (renamed from emulators/wine-proton/files/patch-dlls__wineoss.drv__oss.c)0
-rw-r--r--emulators/wine-proton/files/patch-dlls_winepulse.drv_pulse.c (renamed from emulators/wine-proton/files/patch-dlls__winepulse.drv__pulse.c)0
-rw-r--r--emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c23
-rw-r--r--emulators/wine-proton/files/patch-include_wine_asm.h14
-rw-r--r--emulators/wine-proton/files/patch-libs__wine__config.c11
-rw-r--r--emulators/wine-proton/files/patch-server_token.c24
-rw-r--r--emulators/wine-proton/files/patch-tools_winebuild_res32.c (renamed from emulators/wine-proton/files/patch-tools__winebuild__res32.c)0
-rw-r--r--emulators/wine-proton/files/pkg32.sh6
17 files changed, 322 insertions, 102 deletions
diff --git a/emulators/wine-proton/files/clang/stdarg.h b/emulators/wine-proton/files/clang/stdarg.h
index 0bc39408c1e5..ba978721f1f3 100644
--- a/emulators/wine-proton/files/clang/stdarg.h
+++ b/emulators/wine-proton/files/clang/stdarg.h
@@ -8,13 +8,30 @@
*/
#ifndef __STDARG_H
-#define __STDARG_H
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+typedef __builtin_va_list __gnuc_va_list;
+#endif
+
+#ifdef __need___va_list
+#undef __need___va_list
+#else
+#define __STDARG_H
#ifndef _VA_LIST
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif
+
+/* FIXME: This is using the placeholder dates Clang produces for these macros
+ in C2x mode; switch to the correct values once they've been published. */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
+/* C2x does not require the second parameter for va_start. */
+#define va_start(ap, ...) __builtin_va_start(ap, 0)
+#else
+/* Versions before C2x do require the second parameter. */
#define va_start(ap, param) __builtin_va_start(ap, param)
+#endif
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)
@@ -23,13 +40,12 @@ typedef __builtin_va_list va_list;
*/
#define __va_copy(d,s) __builtin_va_copy(d,s)
-#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L) || \
+ !defined(__STRICT_ANSI__)
#define va_copy(dest, src) __builtin_va_copy(dest, src)
#endif
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST 1
-typedef __builtin_va_list __gnuc_va_list;
-#endif
-
#endif /* __STDARG_H */
+
+#endif /* not __STDARG_H */
diff --git a/emulators/wine-proton/files/clang/stdbool.h b/emulators/wine-proton/files/clang/stdbool.h
new file mode 100644
index 000000000000..9406aab0ca72
--- /dev/null
+++ b/emulators/wine-proton/files/clang/stdbool.h
@@ -0,0 +1,34 @@
+/*===---- stdbool.h - Standard header for booleans -------------------------===
+ *
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+ * See https://llvm.org/LICENSE.txt for license information.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ *
+ *===-----------------------------------------------------------------------===
+ */
+
+#ifndef __STDBOOL_H
+#define __STDBOOL_H
+
+#define __bool_true_false_are_defined 1
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
+/* FIXME: We should be issuing a deprecation warning here, but cannot yet due
+ * to system headers which include this header file unconditionally.
+ */
+#elif !defined(__cplusplus)
+#define bool _Bool
+#define true 1
+#define false 0
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
+/* Define _Bool as a GNU extension. */
+#define _Bool bool
+#if defined(__cplusplus) && __cplusplus < 201103L
+/* For C++98, define bool, false, true as a GNU extension. */
+#define bool bool
+#define false false
+#define true true
+#endif
+#endif
+
+#endif /* __STDBOOL_H */
diff --git a/emulators/wine-proton/files/clang/stddef.h b/emulators/wine-proton/files/clang/stddef.h
new file mode 100644
index 000000000000..42815176dcd0
--- /dev/null
+++ b/emulators/wine-proton/files/clang/stddef.h
@@ -0,0 +1,128 @@
+/*===---- stddef.h - Basic type definitions --------------------------------===
+ *
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+ * See https://llvm.org/LICENSE.txt for license information.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ *
+ *===-----------------------------------------------------------------------===
+ */
+
+#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
+ defined(__need_size_t) || defined(__need_wchar_t) || \
+ defined(__need_NULL) || defined(__need_wint_t)
+
+#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
+ !defined(__need_wchar_t) && !defined(__need_NULL) && \
+ !defined(__need_wint_t)
+/* Always define miscellaneous pieces when modules are available. */
+#if !__has_feature(modules)
+#define __STDDEF_H
+#endif
+#define __need_ptrdiff_t
+#define __need_size_t
+#define __need_wchar_t
+#define __need_NULL
+#define __need_STDDEF_H_misc
+/* __need_wint_t is intentionally not defined here. */
+#endif
+
+#if defined(__need_ptrdiff_t)
+#if !defined(_PTRDIFF_T) || __has_feature(modules)
+/* Always define ptrdiff_t when modules are available. */
+#if !__has_feature(modules)
+#define _PTRDIFF_T
+#endif
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+#endif
+#undef __need_ptrdiff_t
+#endif /* defined(__need_ptrdiff_t) */
+
+#if defined(__need_size_t)
+#if !defined(_SIZE_T) || __has_feature(modules)
+/* Always define size_t when modules are available. */
+#if !__has_feature(modules)
+#define _SIZE_T
+#endif
+typedef __SIZE_TYPE__ size_t;
+#endif
+#undef __need_size_t
+#endif /*defined(__need_size_t) */
+
+#if defined(__need_STDDEF_H_misc)
+/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
+ * enabled. */
+#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
+ !defined(_RSIZE_T)) || __has_feature(modules)
+/* Always define rsize_t when modules are available. */
+#if !__has_feature(modules)
+#define _RSIZE_T
+#endif
+typedef __SIZE_TYPE__ rsize_t;
+#endif
+#endif /* defined(__need_STDDEF_H_misc) */
+
+#if defined(__need_wchar_t)
+#if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED)
+/* Always define wchar_t when modules are available. */
+#if !defined(_WCHAR_T) || __has_feature(modules)
+#if !__has_feature(modules)
+#define _WCHAR_T
+#if defined(_MSC_EXTENSIONS)
+#define _WCHAR_T_DEFINED
+#endif
+#endif
+typedef __WCHAR_TYPE__ wchar_t;
+#endif
+#endif
+#undef __need_wchar_t
+#endif /* defined(__need_wchar_t) */
+
+#if defined(__need_NULL)
+#undef NULL
+#ifdef __cplusplus
+# if !defined(__MINGW32__) && !defined(_MSC_VER)
+# define NULL __null
+# else
+# define NULL 0
+# endif
+#else
+# define NULL ((void*)0)
+#endif
+#ifdef __cplusplus
+#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+namespace std { typedef decltype(nullptr) nullptr_t; }
+using ::std::nullptr_t;
+#endif
+#endif
+#undef __need_NULL
+#endif /* defined(__need_NULL) */
+
+/* FIXME: This is using the placeholder dates Clang produces for these macros
+ in C2x mode; switch to the correct values once they've been published. */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
+typedef typeof(nullptr) nullptr_t;
+#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L */
+
+#if defined(__need_STDDEF_H_misc)
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L)
+#include "__stddef_max_align_t.h"
+#endif
+#define offsetof(t, d) __builtin_offsetof(t, d)
+#undef __need_STDDEF_H_misc
+#endif /* defined(__need_STDDEF_H_misc) */
+
+/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
+__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
+#if defined(__need_wint_t)
+/* Always define wint_t when modules are available. */
+#if !defined(_WINT_T) || __has_feature(modules)
+#if !__has_feature(modules)
+#define _WINT_T
+#endif
+typedef __WINT_TYPE__ wint_t;
+#endif
+#undef __need_wint_t
+#endif /* __need_wint_t */
+
+#endif
diff --git a/emulators/wine-proton/files/patch-configure.ac b/emulators/wine-proton/files/patch-configure.ac
deleted file mode 100644
index f43286842991..000000000000
--- a/emulators/wine-proton/files/patch-configure.ac
+++ /dev/null
@@ -1,33 +0,0 @@
---- configure.ac.orig 2023-09-02 23:55:42.978760000 +0300
-+++ configure.ac 2023-09-03 00:08:27.789243000 +0300
-@@ -863,11 +863,13 @@
-
- saved_CC=$CC
- saved_CFLAGS=$CFLAGS
-+ saved_LDFLAGS=$LDFLAGS
-
- CFLAGS=${CROSSCFLAGS:-"-g -O2"}
-+ LDFLAGS=${CROSSLDFLAGS:-""}
- AS_VAR_COPY([CC],[${wine_arch}_CC])
- AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
-- AS_VAR_COPY([${wine_arch}_LDFLAGS],[CROSSLDFLAGS])
-+ AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS])
- AS_VAR_SET([${wine_arch}_EXTRACFLAGS],["-D__WINE_PE_BUILD -Wall"])
-
- target=""
-@@ -915,6 +915,7 @@
- then
- CC=$saved_CC
- CFLAGS=$saved_CFLAGS
-+ LDFLAGS=$saved_LDFLAGS
- continue
- fi
- AS_VAR_APPEND([PE_ARCHS],[" $wine_arch"])
-@@ -1005,6 +1006,7 @@
-
- CC=$saved_CC
- CFLAGS=$saved_CFLAGS
-+ LDFLAGS=$saved_LDFLAGS
- done
-
- if test $HOST_ARCH = aarch64 -a "x$PE_ARCHS" = x
diff --git a/emulators/wine-proton/files/patch-dlls__ntdll__unix__loader.c b/emulators/wine-proton/files/patch-dlls__ntdll__unix__loader.c
deleted file mode 100644
index 302e91daef47..000000000000
--- a/emulators/wine-proton/files/patch-dlls__ntdll__unix__loader.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- dlls/ntdll/unix/loader.c.orig 2023-07-17 16:05:30.000000000 +0300
-+++ dlls/ntdll/unix/loader.c 2023-09-12 03:00:51.850143000 +0300
-@@ -742,6 +742,21 @@ static NTSTATUS loader_exec( char **argv, WORD machine
- {
- if (machine != current_machine)
- {
-+ char* wineserver_path = getenv("WINESERVER");
-+ if (wineserver_path != NULL && wineserver_path[0] == '/') {
-+ char* s = remove_tail(wineserver_path, "server");
-+ if (s != NULL) {
-+ if (machine == IMAGE_FILE_MACHINE_AMD64) {
-+ argv[1] = malloc(strlen(s) + 3);
-+ strcpy(argv[1], s);
-+ strcat(argv[1], "64");
-+ } else {
-+ argv[1] = s;
-+ }
-+ preloader_exec(argv);
-+ }
-+ }
-+
- if (machine == IMAGE_FILE_MACHINE_AMD64) /* try the 64-bit loader */
- {
- size_t len = strlen(wineloader);
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
new file mode 100644
index 000000000000..5b1b1d9444f3
--- /dev/null
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
@@ -0,0 +1,24 @@
+--- dlls/ntdll/unix/loader.c.orig 2024-04-05 17:03:05 UTC
++++ dlls/ntdll/unix/loader.c
+@@ -480,6 +480,21 @@ char *get_alternate_wineloader( WORD machine )
+
+ if (machine == current_machine) return NULL;
+
++ char* wineserver_path = getenv("WINESERVER");
++ if (wineserver_path != NULL && wineserver_path[0] == '/') {
++ char* s = remove_tail(wineserver_path, "server");
++ if (s != NULL) {
++ if (machine == IMAGE_FILE_MACHINE_AMD64) {
++ ret = malloc(strlen(s) + 3);
++ strcpy(ret, s);
++ strcat(ret, "64");
++ } else {
++ ret = s;
++ }
++ return ret;
++ }
++ }
++
+ if (machine == IMAGE_FILE_MACHINE_AMD64) /* try the 64-bit loader */
+ {
+ size_t len = strlen(wineloader);
diff --git a/emulators/wine-proton/files/patch-dlls__ntdll__unix__signal_x86_64.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c
index 3d8ea03ae147..3d8ea03ae147 100644
--- a/emulators/wine-proton/files/patch-dlls__ntdll__unix__signal_x86_64.c
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c
new file mode 100644
index 000000000000..fa05443c479a
--- /dev/null
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c
@@ -0,0 +1,23 @@
+--- dlls/ntdll/unix/system.c.orig 2024-04-26 15:24:41 UTC
++++ dlls/ntdll/unix/system.c
+@@ -574,6 +574,7 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info
+
+ #endif /* End architecture specific feature detection for CPUs */
+
++#ifdef __linux__
+ static void fill_performance_core_info(void);
+ static BOOL sysfs_parse_bitmap(const char *filename, ULONG_PTR *mask);
+
+@@ -712,6 +713,12 @@ error:
+ cpu_override.mapping.cpu_count = 0;
+ ERR("Invalid WINE_CPU_TOPOLOGY string %s (%s).\n", debugstr_a(env_override), debugstr_a(s));
+ }
++#else
++static void fill_cpu_override(unsigned int)
++{
++ /* do nothing */
++}
++#endif
+
+ struct cpu_topology_override *get_cpu_topology_override(void)
+ {
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c
new file mode 100644
index 000000000000..b010c2d834de
--- /dev/null
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c
@@ -0,0 +1,50 @@
+--- dlls/ntdll/unix/virtual.c.orig 2024-04-26 15:24:41 UTC
++++ dlls/ntdll/unix/virtual.c
+@@ -64,9 +64,11 @@
+ # include <mach/mach_vm.h>
+ #endif
+
++#ifdef __linux__
+ #include <linux/userfaultfd.h>
+ #include <sys/ioctl.h>
+ #include "uffd_tmp_defs.h"
++#endif
+
+ #include <sys/uio.h>
+
+@@ -258,6 +260,7 @@ void *anon_mmap_alloc( size_t size, int prot )
+ return mmap( NULL, size, prot, MAP_PRIVATE | MAP_ANON, -1, 0 );
+ }
+
++#ifdef __linux__
+ static void kernel_writewatch_softdirty_init(void)
+ {
+ if ((pagemap_reset_fd = open( "/proc/self/pagemap_reset", O_RDONLY | O_CLOEXEC )) == -1) return;
+@@ -494,7 +497,27 @@ static NTSTATUS kernel_get_write_watches( void *base,
+ }
+ return STATUS_SUCCESS;
+ }
++#else
++static void kernel_writewatch_init(void)
++{
++ use_kernel_writewatch = 0;
++}
+
++static void kernel_writewatch_register_range(struct file_view*, void*, size_t)
++{
++ /* do nothing */
++}
++
++static void kernel_writewatch_reset(void*, SIZE_T)
++{
++ abort();
++}
++
++static NTSTATUS kernel_get_write_watches(void*, SIZE_T, void**, ULONG_PTR*, BOOL)
++{
++ abort();
++}
++#endif
+
+ static void mmap_add_reserved_area( void *addr, SIZE_T size )
+ {
diff --git a/emulators/wine-proton/files/patch-dlls__wineoss.drv__oss.c b/emulators/wine-proton/files/patch-dlls_wineoss.drv_oss.c
index efab51eabf75..efab51eabf75 100644
--- a/emulators/wine-proton/files/patch-dlls__wineoss.drv__oss.c
+++ b/emulators/wine-proton/files/patch-dlls_wineoss.drv_oss.c
diff --git a/emulators/wine-proton/files/patch-dlls__winepulse.drv__pulse.c b/emulators/wine-proton/files/patch-dlls_winepulse.drv_pulse.c
index ebb5839b8980..ebb5839b8980 100644
--- a/emulators/wine-proton/files/patch-dlls__winepulse.drv__pulse.c
+++ b/emulators/wine-proton/files/patch-dlls_winepulse.drv_pulse.c
diff --git a/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c b/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c
new file mode 100644
index 000000000000..b0f693c0909c
--- /dev/null
+++ b/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c
@@ -0,0 +1,23 @@
+--- dlls/winevulkan/vulkan.c.orig
++++ dlls/winevulkan/vulkan.c
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include <limits.h>
++#include <pthread_np.h>
+ #ifdef HAVE_SYS_SYSCALL_H
+ # include <sys/syscall.h>
+ #endif
+@@ -4332,11 +4333,7 @@ signal_op_complete:
+
+ void *signaller_worker(void *arg)
+ {
+-#ifdef HAVE_SYS_SYSCALL_H
+- int unix_tid = syscall( __NR_gettid );
+-#else
+- int unix_tid = -1;
+-#endif
++ int unix_tid = pthread_getthreadid_np();
+ struct wine_device *device = arg;
+ struct wine_semaphore *sem;
+ VkSemaphoreWaitInfo wait_info = { 0 };
diff --git a/emulators/wine-proton/files/patch-include_wine_asm.h b/emulators/wine-proton/files/patch-include_wine_asm.h
new file mode 100644
index 000000000000..f9d791b66580
--- /dev/null
+++ b/emulators/wine-proton/files/patch-include_wine_asm.h
@@ -0,0 +1,14 @@
+--- include/wine/asm.h.orig 2024-02-24 10:23:40.551780000 +0300
++++ include/wine/asm.h 2024-02-24 10:23:43.285931000 +0300
+@@ -242,9 +242,9 @@
+ ".byte 0x75,0x03\n\t" /* jne 1f */ \
+ ".byte 0x0f,0x05\n\t" /* syscall */ \
+ ".byte 0xc3\n\t" /* ret */ \
+- "jmp 1f\n\t" \
++ ".byte 0xeb,0x01\n\t" /* jmp 1f */ \
+ ".byte 0xc3\n" /* ret */ \
+- "1:\t.byte 0xff,0x14,0x25\n\t" /* 1: callq *(0x7ffe1000) */ \
++ ".byte 0xff,0x14,0x25\n\t" /* 1: callq *(0x7ffe1000) */ \
+ ".long 0x7ffe1000\n\t" \
+ "ret" )
+ # else
diff --git a/emulators/wine-proton/files/patch-libs__wine__config.c b/emulators/wine-proton/files/patch-libs__wine__config.c
deleted file mode 100644
index fc89f6efc3e0..000000000000
--- a/emulators/wine-proton/files/patch-libs__wine__config.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/wine/config.c.orig 2023-07-17 16:05:30.000000000 +0300
-+++ libs/wine/config.c 2023-09-10 09:32:37.552268000 +0300
-@@ -147,7 +147,7 @@ static char *get_runtime_exedir(void)
- static int pathname[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
- size_t dir_size = PATH_MAX;
- char *dir = malloc( dir_size );
-- if (dir && !sysctl( pathname, ARRAY_SIZE( pathname ), dir, &dir_size, NULL, 0 ))
-+ if (dir && !sysctl( pathname, sizeof(pathname)/sizeof(pathname[0]), dir, &dir_size, NULL, 0 ))
- return dir;
- free( dir );
- return NULL;
diff --git a/emulators/wine-proton/files/patch-server_token.c b/emulators/wine-proton/files/patch-server_token.c
deleted file mode 100644
index 384adf3085b8..000000000000
--- a/emulators/wine-proton/files/patch-server_token.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- server/token.c.orig 2022-12-18 11:53:01.498015000 +0300
-+++ server/token.c 2022-12-18 11:53:14.540515000 +0300
-@@ -212,10 +212,10 @@ void init_user_sid(void)
- size_t n;
- FILE *f;
-
-- f = fopen( "/etc/machine-id", "r" );
-+ f = fopen( "/var/lib/dbus/machine-id", "r" );
- if (!f)
- {
-- fprintf( stderr, "Failed to open /etc/machine-id, error %s.\n", strerror( errno ));
-+ fprintf( stderr, "Failed to open /var/lib/dbus/machine-id, error %s.\n", strerror( errno ));
- return;
- }
-
-@@ -224,7 +224,7 @@ void init_user_sid(void)
-
- if (n != 16)
- {
-- fprintf( stderr, "Failed to read /etc/machine-id, error %s.\n", strerror( errno ));
-+ fprintf( stderr, "Failed to read /var/lib/dbus/machine-id, error %s.\n", strerror( errno ));
- return;
- }
- machine_id[n] = 0;
diff --git a/emulators/wine-proton/files/patch-tools__winebuild__res32.c b/emulators/wine-proton/files/patch-tools_winebuild_res32.c
index 3e095a9c1903..3e095a9c1903 100644
--- a/emulators/wine-proton/files/patch-tools__winebuild__res32.c
+++ b/emulators/wine-proton/files/patch-tools_winebuild_res32.c
diff --git a/emulators/wine-proton/files/pkg32.sh b/emulators/wine-proton/files/pkg32.sh
index 6e87ee27add3..64d82459c219 100644
--- a/emulators/wine-proton/files/pkg32.sh
+++ b/emulators/wine-proton/files/pkg32.sh
@@ -14,6 +14,6 @@ then
ln -s /usr/share/keys/pkg "$I386_ROOT/usr/share/keys/pkg"
fi
-ABI=$(pkg config ABI | sed s/amd64/i386/)
-echo pkg -o ABI="$ABI" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
-exec pkg -o ABI="$ABI" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
+# Show what we're going to do, then do it.
+echo pkg -o ABI_FILE=/usr/lib32/libc.so.7 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
+exec pkg -o ABI_FILE=/usr/lib32/libc.so.7 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"