Git development
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: jeffhost@microsoft.com, "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH] fixup! fsmonitor-fs-listen-macos: implement FSEvent listener on MacOS
Date: Thu, 19 Aug 2021 11:36:52 -0700	[thread overview]
Message-ID: <20210819183652.7750-1-carenas@gmail.com> (raw)

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


             reply	other threads:[~2021-08-19 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 18:36 Carlo Marcelo Arenas Belón [this message]
2021-08-19 20:48 ` [PATCH] fixup! fsmonitor-fs-listen-macos: implement FSEvent listener on MacOS Jeff Hostetler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210819183652.7750-1-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox