git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fixup! fsmonitor-fs-listen-macos: implement FSEvent listener on MacOS

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Aug 19, 2021, 18:36 UTC
Message-ID
<20210819183652.7750-1-carenas@gmail.com>

clang defines __GNUC__ for compatibility with gcc (indeed it misrepresents itself as gcc 4.2.1), so instead use the __clang__ specific macro to distinguish between them.

tested with Apple clang 12.0.5, clang 14 and gcc 11.2.0
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 compat/fsmonitor/fsmonitor-fs-listen-macos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/fsmonitor/fsmonitor-fs-listen-macos.c b/compat/fsmonitor/fsmonitor-fs-listen-macos.c
index 02f89de216..c55ec35b5d 100644
--- a/compat/fsmonitor/fsmonitor-fs-listen-macos.c
+++ b/compat/fsmonitor/fsmonitor-fs-listen-macos.c
@@ -1,4 +1,4 @@
-#if defined(__GNUC__)
+#ifndef __clang__
 /*
  * It is possible to #include CoreFoundation/CoreFoundation.h when compiling
  * with clang, but not with GCC as of time of writing.
-- 
2.33.0.481.g26d3bed244
Next: Jeff Hostetler
Message 1 of 2 in “fixup! fsmonitor-fs-listen-macos: implement FSEvent listener on MacOS”
  1. fixup! fsmonitor-fs-listen-macos: implement FSEvent listener on MacOSCarlo Marcelo Arenas Belón, Aug 19, 2021
  2. Jeff HostetlerAug 19, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.