Tue Apr 9 01:12:36 2024 UTC (69d)
sysutils/open-vm-tools: Update to 12.4.0

open-vm-tools now supports NetBSD/aarch64. At least vmhgfs-fuse has been
confirmed to be working on this platform. vmware-user is still useless
though, because it requires either Wayland running on top of recent DRM/KMS
supporting SVGA v3 (which hasn't been ported to NetBSD as of writing) or
xf86-video-vmware, which only supports SVGA v1 and v2. VMware only provides
SVGA v3 interface on AArch64 platforms so nothing can interact with VMware
graphics aside from the standard framebuffer (via xf86-video-wsfb) at the
moment.

Release notes:
* https://github.com/vmware/open-vm-tools/blob/stable-12.4.0/ReleaseNotes.md
* https://github.com/vmware/open-vm-tools/blob/stable-12.3.5/ReleaseNotes.md
* https://github.com/vmware/open-vm-tools/blob/stable-12.3.0/ReleaseNotes.md
* https://github.com/vmware/open-vm-tools/blob/stable-12.2.5/ReleaseNotes.md


(pho)
diff -r1.126 -r1.127 pkgsrc/sysutils/open-vm-tools/Makefile
diff -r1.40 -r1.41 pkgsrc/sysutils/open-vm-tools/distinfo
diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-Makefile.am
diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_include_sigPosixRegs.h
diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-services_plugins_timeSync_Makefile.am
diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-ar
diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-au
diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-libguestlib_Makefile.am
diff -r1.1 -r1.2 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_hostinfoPosix.c
diff -r1.1 -r1.2 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_vthreadBase.c

cvs diff -r1.126 -r1.127 pkgsrc/sysutils/open-vm-tools/Makefile (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/Makefile 2024/04/07 07:35:02 1.126
+++ pkgsrc/sysutils/open-vm-tools/Makefile 2024/04/09 01:12:36 1.127
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.126 2024/04/07 07:35:02 wiz Exp $
+# $NetBSD: Makefile,v 1.127 2024/04/09 01:12:36 pho Exp $
 
-OVTVER=		12.1.5
-DISTNAME=	open-vm-tools-${OVTVER}-20735119
+OVTVER=		12.4.0
+DISTNAME=	open-vm-tools-${OVTVER}-23259341
 PKGNAME=	open-vm-tools-${OVTVER}
-PKGREVISION=	9
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_GITHUB:=vmware/}
 GITHUB_RELEASE=	stable-${OVTVER}
@@ -13,7 +12,7 @@
 COMMENT=	Open source VMware tools
 LICENSE=	gnu-lgpl-v2.1
 
-ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-x86_64
+BROKEN_EXCEPT_ON_PLATFORM=	*-*-aarch64 *-*-i386 *-*-x86_64
 
 # Workaround for glib2-2.68.0 c++ fallout.
 CXXFLAGS+=	-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66

cvs diff -r1.40 -r1.41 pkgsrc/sysutils/open-vm-tools/distinfo (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/distinfo 2024/03/02 13:52:42 1.40
+++ pkgsrc/sysutils/open-vm-tools/distinfo 2024/04/09 01:12:36 1.41
@@ -1,18 +1,18 @@
-$NetBSD: distinfo,v 1.40 2024/03/02 13:52:42 wiz Exp $
+$NetBSD: distinfo,v 1.41 2024/04/09 01:12:36 pho Exp $
 
-BLAKE2s (open-vm-tools-12.1.5-20735119.tar.gz) = 409c366cc3dfb610fd00bf2b5d1037919ed37203862c8a810c64144b2dc660af
-SHA512 (open-vm-tools-12.1.5-20735119.tar.gz) = d85fec73a58cb1c9b2956aff886825b9d47d00dc6d0d8a3d2ecdfac3fa982c27463b9cc2f42bf3dd18fe542b30f751850e8051e270c547e897f06a4e1c12d639
-Size (open-vm-tools-12.1.5-20735119.tar.gz) = 4357637 bytes
-SHA1 (patch-Makefile.am) = 48a4a30df301b591d0755c9f2ea6b08f937f3fc9
+BLAKE2s (open-vm-tools-12.4.0-23259341.tar.gz) = 6de55ae64ccf2a603b9c48e28fde548ed426255f0bbe69a8d916e9b1f0798233
+SHA512 (open-vm-tools-12.4.0-23259341.tar.gz) = 11ea43c64ec534922145f83e2b7ef9254437f80656ad03b596340a78c3698adcc7d84adade9c5d8e1c83b5ebc3bd086601b1d104e0f070274dc2b6bc1f64fb17
+Size (open-vm-tools-12.4.0-23259341.tar.gz) = 4353211 bytes
+SHA1 (patch-Makefile.am) = 0f0345ea4d092c34a2b99beec43b64035c658433
 SHA1 (patch-ag) = a54f2a76e7b08c8c005a576d4e43ede3f0e0c9da
 SHA1 (patch-ah) = 2f59c9d650d378a84118991f75c59281a4836aaa
 SHA1 (patch-ai) = 3e8c67a33f6072319f1741bda960377fc2663b06
 SHA1 (patch-ak) = 07f926ccc90f07301075e1fb63769f8c1e926f75
 SHA1 (patch-aq) = 512a662530ef96c905eb61f6f9e459d6cd1c4b8e
-SHA1 (patch-ar) = b06873f37ac826912e647f2349dc88053bf2cb67
+SHA1 (patch-ar) = 0ff0f865aa0b0d38f0b68cdc00c4679ee205aacc
 SHA1 (patch-as) = b029c646cb49ee15a92827f100470489106a2f2f
 SHA1 (patch-at) = 6dbe029926e18075eedf9e2947807f8a4d593136
-SHA1 (patch-au) = 518ca50f944fad718a5e8deb66e83a405ce88159
+SHA1 (patch-au) = bcacf757f1badbb1ef31dd6f7b438e974ac0d62c
 SHA1 (patch-ay) = ff2f26b43c5d74c3d6e6d816d5ac3177cfbe505d
 SHA1 (patch-az) = 971e3389db9d5d0a758ebe5b75cb45b419d50ba7
 SHA1 (patch-ba) = 77a57e736f3b02b8f942ae3543cee065a4c4e732
@@ -32,23 +32,23 @@
 SHA1 (patch-lib_guestApp_guestApp.c) = b798b977b4e0c6dde71dec00fb84021c92256f84
 SHA1 (patch-lib_hgfsHelper_hgfsHelperPosix.c) = 9299f0a781d11689b04223a1dfd1c4725912f863
 SHA1 (patch-lib_hgfsUri_hgfsUriPosix.c) = f98eab5cb5885a9c2e258bf072b24d8806b20fd4
-SHA1 (patch-lib_include_sigPosixRegs.h) = a2d7a4c72ea4a7ba4c191fac06ebf1085ec31fa9
+SHA1 (patch-lib_include_sigPosixRegs.h) = 2d43d080d2dc33b7bb701d799760ab5d64fb3133
 SHA1 (patch-lib_include_vmblock__user.h) = fedbed79f997ce1e2c5a9d834374734ed56be51a
 SHA1 (patch-lib_include_vmci__sockets.h) = fba82038daf87a08f04ddd541281122f0047e968
 SHA1 (patch-lib_lock_ulSema.c) = 6908d4b453cbdb74100c9419da95a07db532c624
-SHA1 (patch-lib_misc_hostinfoPosix.c) = 4daea6167cee2be57cc3acc0caa710ca940d1eb7
-SHA1 (patch-lib_misc_vthreadBase.c) = 8d2a2749d7ed343d2648f74546d69baab949e5cf
+SHA1 (patch-lib_misc_hostinfoPosix.c) = 91f0540de32172c3d4049828f34f66c143dae857
+SHA1 (patch-lib_misc_vthreadBase.c) = 341ffe3d7d484cf952dace1daa127e2e0a82e35a
 SHA1 (patch-lib_nicInfo_nicInfoInt.h) = 81d5e8625496218a679c0a87f30a08cc2e3af7a7
 SHA1 (patch-lib_nicInfo_nicInfoPosix.c) = 2fe2da8d6fbf8f8c44c110b2ed37d2decd91b6a7
 SHA1 (patch-lib_rpcChannel_rpcChannel.c) = 4133707d70844eb12c25c48d6bb0b26a370987b3
 SHA1 (patch-lib_user_utilBacktrace.c) = 741cc72d64f962fa0aa48e90b1f912f422c5dd8b
-SHA1 (patch-libguestlib_Makefile.am) = fff8e8df30c91ffb4fd2c14017633be1b3cb47ec
+SHA1 (patch-libguestlib_Makefile.am) = 0e938c958628afd079e40a9bbc3c99e3b767a048
 SHA1 (patch-network) = 21a9196b4ce6101450bfd9ea6fcb283a9ba4f56e
 SHA1 (patch-scripts_Makefile.am) = 30ca9cef3fb39018cdee2e0b5847945abc98c160
 SHA1 (patch-scripts_netbsd_network) = 0bb7e6f71fa811e1c789a4d0825b4bd0181fb2cf
 SHA1 (patch-services_plugins_dndcp_dnd_dndLinux.c) = d959de9443581ad53de394079fb85bee1bdda8c3
 SHA1 (patch-services_plugins_guestInfo_perfMonLinux.c) = be7912f53989d298b5965cb566085cd0a0e5cc90
-SHA1 (patch-services_plugins_timeSync_Makefile.am) = c92d64573e7c5718e955d32991c8951ea2408d43
+SHA1 (patch-services_plugins_timeSync_Makefile.am) = ae246998326e5c7f6adb6d7eebc318ba8c8af786
 SHA1 (patch-services_plugins_vix_vixTools.c) = a7e9df7fde7997315ef0ea77c50bbf1d410a2d9d
 SHA1 (patch-services_vmtoolsd_Makefile.am) = 558ed58e8fc6d933f0a9698c865b33f88a91c51c
 SHA1 (patch-vgauth_common_VGAuthLog.c) = 9beacc4665fb6133059279be2594892ebb6ba5d9

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-Makefile.am (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-Makefile.am 2023/02/10 01:22:08 1.2
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-Makefile.am 2024/04/09 01:12:36 1.3
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makefile.am,v 1.2 2023/02/10 01:22:08 khorben Exp $
+$NetBSD: patch-Makefile.am,v 1.3 2024/04/09 01:12:36 pho Exp $
 
 Fix the installation path for tools.conf
 
---- Makefile.am.orig	2022-02-11 15:32:23.000000000 +0000
+--- Makefile.am.orig	2024-02-06 15:07:33.000000000 +0000
 +++ Makefile.am
-@@ -72,6 +72,6 @@ if HAVE_UDEV
- endif
+@@ -73,6 +73,6 @@ endif
+ 
  
  install-data-local:
 -	$(INSTALL) -d $(DESTDIR)/etc/vmware-tools/

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_include_sigPosixRegs.h (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-lib_include_sigPosixRegs.h 2018/01/01 06:56:01 1.2
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-lib_include_sigPosixRegs.h 2024/04/09 01:12:36 1.3
@@ -1,13 +1,15 @@
-$NetBSD: patch-lib_include_sigPosixRegs.h,v 1.2 2018/01/01 06:56:01 ryoon Exp $
+$NetBSD: patch-lib_include_sigPosixRegs.h,v 1.3 2024/04/09 01:12:36 pho Exp $
 
---- lib/include/sigPosixRegs.h.orig	2017-12-15 19:09:51.000000000 +0000
+Support NetBSD/i386, NetBSD/amd64, and NetBSD/aarch64.
+
+--- lib/include/sigPosixRegs.h.orig	2024-02-06 15:08:43.000000000 +0000
 +++ lib/include/sigPosixRegs.h
-@@ -230,6 +230,36 @@ extern "C" {
+@@ -233,6 +233,38 @@ extern "C" {
  #define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[ESP])
  #define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EIP])
  #endif
 +#elif defined (__NetBSD__)
-+#ifdef __x86_64__
++#if defined(__x86_64__)
 +#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_RAX])
 +#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_RBX])
 +#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_RCX])
@@ -25,6 +27,8 @@
 +#define SC_R13(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_R13])
 +#define SC_R14(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_R14])
 +#define SC_R15(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_R15])
++#elif defined(__aarch64__)
++#define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext.__gregs[n])
 +#else
 +#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_EAX])
 +#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.__gregs[_REG_EBX])

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/open-vm-tools/patches/patch-services_plugins_timeSync_Makefile.am (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-services_plugins_timeSync_Makefile.am 2016/12/23 04:11:03 1.2
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-services_plugins_timeSync_Makefile.am 2024/04/09 01:12:36 1.3
@@ -1,13 +1,15 @@
-$NetBSD: patch-services_plugins_timeSync_Makefile.am,v 1.2 2016/12/23 04:11:03 ryoon Exp $
+$NetBSD: patch-services_plugins_timeSync_Makefile.am,v 1.3 2024/04/09 01:12:36 pho Exp $
 
---- services/plugins/timeSync/Makefile.am.orig	2016-09-29 10:07:01.000000000 +0000
+Fix build on NetBSD.
+
+--- services/plugins/timeSync/Makefile.am.orig	2024-02-06 15:07:33.000000000 +0000
 +++ services/plugins/timeSync/Makefile.am
-@@ -43,4 +43,8 @@ if LINUX
- libtimeSync_la_SOURCES += slewLinux.c
+@@ -45,4 +45,7 @@ libtimeSync_la_SOURCES += slewLinux.c
  libtimeSync_la_SOURCES += pllLinux.c
+ libtimeSync_la_SOURCES += timeInfo.c
  endif
+-
 +if NETBSD
 +libtimeSync_la_SOURCES += slewAdjtime.c
 +libtimeSync_la_SOURCES += pllNone.c
 +endif
- 

cvs diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-ar (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-ar 2016/10/09 03:41:56 1.3
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-ar 2024/04/09 01:12:36 1.4
@@ -1,13 +1,15 @@
-$NetBSD: patch-ar,v 1.3 2016/10/09 03:41:56 ryoon Exp $
+$NetBSD: patch-ar,v 1.4 2024/04/09 01:12:36 pho Exp $
 
---- lib/include/iovector.h.orig	2016-02-16 20:06:46.000000000 +0000
+Fix build on NetBSD: struct iovec resides in <sys/uio.h>
+
+--- lib/include/iovector.h.orig	2024-02-06 15:08:41.000000000 +0000
 +++ lib/include/iovector.h
-@@ -32,7 +32,7 @@
- /*
+@@ -37,7 +37,7 @@ extern "C" {
   * Ugly definition of struct iovec.
   */
--#if defined(__linux__) || defined(sun) || defined(__APPLE__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(sun) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #if defined(__linux__) || defined(sun) || defined(__APPLE__) || \
+-    defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
++    defined(__FreeBSD__) || defined(__NetBSD__) || defined(__EMSCRIPTEN__)
  #include <sys/uio.h>    // for struct iovec
  #else
  

cvs diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-au (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-au 2016/10/09 03:41:56 1.3
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-au 2024/04/09 01:12:36 1.4
@@ -1,13 +1,15 @@
-$NetBSD: patch-au,v 1.3 2016/10/09 03:41:56 ryoon Exp $
+$NetBSD: patch-au,v 1.4 2024/04/09 01:12:36 pho Exp $
 
---- lib/include/su.h.orig	2016-02-16 20:06:46.000000000 +0000
+Fix build on NetBSD.
+
+--- lib/include/su.h.orig	2024-02-06 15:08:43.000000000 +0000
 +++ lib/include/su.h
-@@ -50,7 +50,7 @@ Bool Id_AuthCheck(char const *right,
-                   char const *localizedDescription,
+@@ -56,7 +56,7 @@ Bool Id_AuthCheck(char const *right,
                    Bool showDialogIfNeeded);
  
--#elif (defined(__linux__) || defined(sun) || defined(__FreeBSD__))
-+#elif (defined(__linux__) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__))
+ #elif defined(__linux__) || defined(sun) || defined(__FreeBSD__) || \
+-      defined(__EMSCRIPTEN__)
++      defined(__NetBSD__) || defined(__EMSCRIPTEN__)
  
  #include <sys/types.h>
  #include <unistd.h>

cvs diff -r1.3 -r1.4 pkgsrc/sysutils/open-vm-tools/patches/patch-libguestlib_Makefile.am (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-libguestlib_Makefile.am 2021/12/07 18:25:46 1.3
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-libguestlib_Makefile.am 2024/04/09 01:12:36 1.4
@@ -1,14 +1,17 @@
-$NetBSD: patch-libguestlib_Makefile.am,v 1.3 2021/12/07 18:25:46 adam Exp $
+$NetBSD: patch-libguestlib_Makefile.am,v 1.4 2024/04/09 01:12:36 pho Exp $
 
-Do not link against dl.
+Do not link against dl. It is already handled by ./configure, and doing it
+explicitly here causes a linkage failure on platforms where libdl doesn't
+exist (such as NetBSD).
 
---- libguestlib/Makefile.am.orig	2021-12-07 13:10:18.901007820 +0000
+--- libguestlib/Makefile.am.orig	2024-02-06 15:07:33.000000000 +0000
 +++ libguestlib/Makefile.am
-@@ -51,7 +51,6 @@ libguestlib_la_SOURCES += $(libguestlib_
+@@ -50,7 +50,7 @@ libguestlib_la_SOURCES += $(libguestlib_
+ libguestlib_la_SOURCES += $(libguestlib_rpcchanneldir)/simpleSocket.c
  endif
  
- libguestlib_la_LDFLAGS =
--libguestlib_la_LDFLAGS += -Wl,-ldl
- libguestlib_la_LDFLAGS += -Wl,-lrt
+-libguestlib_la_LIBADD += -ldl -lrt
++libguestlib_la_LIBADD += -lrt
  # We require GCC, so we're fine passing compiler-specific flags.
  # Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
+ libguestlib_la_LIBADD += -lc

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_hostinfoPosix.c (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_hostinfoPosix.c 2016/10/09 03:41:56 1.1
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_hostinfoPosix.c 2024/04/09 01:12:36 1.2
@@ -1,8 +1,19 @@
-$NetBSD: patch-lib_misc_hostinfoPosix.c,v 1.1 2016/10/09 03:41:56 ryoon Exp $
+$NetBSD: patch-lib_misc_hostinfoPosix.c,v 1.2 2024/04/09 01:12:36 pho Exp $
 
---- lib/misc/hostinfoPosix.c.orig	2016-02-16 20:06:46.000000000 +0000
+Fix build on NetBSD.
+
+--- lib/misc/hostinfoPosix.c.orig	2024-02-06 15:08:41.000000000 +0000
 +++ lib/misc/hostinfoPosix.c
-@@ -3289,7 +3289,7 @@ HostinfoSysinfo(uint64 *totalRam,  // OU
+@@ -93,7 +93,7 @@
+ #include <paths.h>
+ #endif
+ 
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__NetBSD__)
+ #include <dlfcn.h>
+ #endif
+ 
+@@ -4184,7 +4184,7 @@ HostinfoSysinfo(uint64 *totalRam,  // OU
  #endif // ifndef __APPLE__
  
  

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_vthreadBase.c (expand / switch to context diff)
--- pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_vthreadBase.c 2018/01/01 06:56:01 1.1
+++ pkgsrc/sysutils/open-vm-tools/patches/patch-lib_misc_vthreadBase.c 2024/04/09 01:12:36 1.2
@@ -1,13 +1,16 @@
-$NetBSD: patch-lib_misc_vthreadBase.c,v 1.1 2018/01/01 06:56:01 ryoon Exp $
+$NetBSD: patch-lib_misc_vthreadBase.c,v 1.2 2024/04/09 01:12:36 pho Exp $
 
---- lib/misc/vthreadBase.c.orig	2017-12-15 19:09:51.000000000 +0000
+NetBSD implementation for VThreadBase_GetKernelID(). Use pthread_self() and
+cast the resulting pthread_t into uint64.
+
+--- lib/misc/vthreadBase.c.orig	2024-02-06 15:08:41.000000000 +0000
 +++ lib/misc/vthreadBase.c
 @@ -352,6 +352,8 @@ VThreadBase_GetKernelID(void)
  #  endif
     // Best effort until FreeBSD header update
     return (uint64)(uintptr_t)(void *)pthread_self();
-+#elif defined(__NetBSD__)
++#elif defined __NetBSD__
 +   return (uint64)(uintptr_t)(void *)pthread_self();
+ #elif defined __EMSCRIPTEN__
+    return (uint64)(uintptr_t)(void *)pthread_self();
  #else
- #  error "Unknown platform"
- #endif