diff -urN nsync-1.24.0-orig/platform/clang/platform_c++11_os.h nsync-1.24.0/platform/clang/platform_c++11_os.h
--- nsync-1.24.0-orig/platform/clang/platform_c++11_os.h	1970-01-01 07:30:00.000000000 +0730
+++ nsync-1.24.0/platform/clang/platform_c++11_os.h	2022-02-24 23:22:34.489400700 +0800
@@ -0,0 +1,36 @@
+/* Copyright 2016 Google Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. */
+
+#ifndef NSYNC_PLATFORM_CLANG_PLATFORM_CPP_OS_H_
+#define NSYNC_PLATFORM_CLANG_PLATFORM_CPP_OS_H_
+
+/* Windows lacks pthread_key_t. */
+#include "windows.h"
+#define sched_yield() Sleep(0)
+NSYNC_C_START_
+/* Can't use TlsAlloc() because we use pthread_key_create's destructor
+   argument, so we implement it anew. */
+#define pthread_key_t nsync_pthread_key_t
+typedef int nsync_pthread_key_t;
+int nsync_pthread_key_create (nsync_pthread_key_t *pkey, void (*dest) (void *));
+int nsync_pthread_key_delete (nsync_pthread_key_t key);
+void *nsync_pthread_getspecific (nsync_pthread_key_t key);
+int nsync_pthread_setspecific (nsync_pthread_key_t key, void *value);
+#define pthread_key_create nsync_pthread_key_create
+#define pthread_key_delete nsync_pthread_key_delete
+#define pthread_getspecific nsync_pthread_getspecific
+#define pthread_setspecific nsync_pthread_setspecific
+NSYNC_C_END_
+
+#endif /*NSYNC_PLATFORM_CLANG_PLATFORM_CPP_OS_H_*/
