aboutsummaryrefslogtreecommitdiffstats
path: root/compat/simple-ipc/ipc-win32.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2021-05-20 18:28:10 +0000
committerJunio C Hamano <gitster@pobox.com>2021-05-21 07:55:00 +0900
commit6aac70a870fc40482eca943ff0b64003497d69c1 (patch)
treeccda33257024978db9833175a9d4a32b300d6db2 /compat/simple-ipc/ipc-win32.c
parentt0052: add simple-ipc tests and t/helper/test-simple-ipc tool (diff)
downloadgit-6aac70a870fc40482eca943ff0b64003497d69c1.tar.gz
git-6aac70a870fc40482eca943ff0b64003497d69c1.zip
simple-ipc: correct ifdefs when NO_PTHREADS is defined
Simple IPC always requires threads (in addition to various platform-specific IPC support). Fix the ifdefs in the Makefile to define SUPPORTS_SIMPLE_IPC when appropriate. Previously, the Unix version of the code would only verify that Unix domain sockets were available. This problem was reported here: https://lore.kernel.org/git/YKN5lXs4AoK%2FJFTO@coredump.intra.peff.net/T/#m08be8f1942ea8a2c36cfee0e51cdf06489fdeafc Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/simple-ipc/ipc-win32.c')
-rw-r--r--compat/simple-ipc/ipc-win32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/compat/simple-ipc/ipc-win32.c b/compat/simple-ipc/ipc-win32.c
index 8f89c02037..8dc7bda087 100644
--- a/compat/simple-ipc/ipc-win32.c
+++ b/compat/simple-ipc/ipc-win32.c
@@ -4,8 +4,12 @@
#include "pkt-line.h"
#include "thread-utils.h"
-#ifndef GIT_WINDOWS_NATIVE
-#error This file can only be compiled on Windows
+#ifndef SUPPORTS_SIMPLE_IPC
+/*
+ * This source file should only be compiled when Simple IPC is supported.
+ * See the top-level Makefile.
+ */
+#error SUPPORTS_SIMPLE_IPC not defined
#endif
static int initialize_pipe_name(const char *path, wchar_t *wpath, size_t alloc)