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

[PATCH] git-compat-util: fix NO_OPENSSL on current macOS

From
René Scharfe <l.s.r@web.de>
Date
Apr 14, 2024, 16:47 UTC
Message-ID
<3188f4e2-9744-40b1-8f05-0896b8679d25@web.de>

b195aa00c1 (git-compat-util: suppress unavoidable Apple-specific deprecation warnings, 2014-12-16) started to define __AVAILABILITY_MACROS_USES_AVAILABILITY in git-compat-util.h. On current versions it is already defined (e.g. on macOS 14.4.1). Undefine it before redefining it to avoid a compilation error.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
On my system I can remove the whole ifdef __APPLE__ section, as the OS
doesn't include the deprecated OpenSSL anymore.  I get a current version
via Homebrew, which doesn't throw any deprecation warnings, of course.

Not sure if this is the right fix, as the no longer needed section still undefines __AVAILABILITY_MACROS_USES_AVAILABILITY at the end, which we may want to keep instead. But compilation succeeds and tests pass, so perhaps it's fine.

 git-compat-util.h | 1 +
 1 file changed, 1 insertion(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 7c2a6538e5..1a4f5a30c3 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -391,6 +391,7 @@ char *gitdirname(char *);

 #ifndef NO_OPENSSL
 #ifdef __APPLE__
+#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
 #define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
 #include <AvailabilityMacros.h>
 #undef DEPRECATED_ATTRIBUTE
--
2.44.0
Next: Eric Sunshine
Message 1 of 2 in “git-compat-util: fix NO_OPENSSL on current macOS”
  1. git-compat-util: fix NO_OPENSSL on current macOSRené Scharfe, Apr 14, 2024
  2. Eric SunshineApr 18, 2024

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.