public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
Subject: [PATCH v4 1/1] Suppress "has no symbols" linker warnings on macOS.
Date: Tue, 28 Apr 2026 15:27:39 -0500
After a recent macOS update, building Postgres produces warnings
that look like this:
ranlib: warning: 'libpgport_shlib.a(pg_cpu_x86.c.o)' has no symbols
ranlib: warning: 'libpgport_shlib.a(pg_popcount_x86.c.o)' has no symbols
To fix, add a dummy symbol to files that may otherwise have none.
Reported-by: Zhang Mingli <[email protected]>
Discussion: https://postgr.es/m/229aaaf3-f529-44ed-8e50-00cb6909af21%40Spark
Backpatch-through: 14
---
src/common/protocol_openssl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/common/protocol_openssl.c b/src/common/protocol_openssl.c
index 92a0a22ecfb..7554e9444f6 100644
--- a/src/common/protocol_openssl.c
+++ b/src/common/protocol_openssl.c
@@ -114,4 +114,10 @@ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version)
return 1; /* success */
}
-#endif /* !SSL_CTX_set_min_proto_version */
+#else
+
+/* prevent linker complaints about empty module */
+extern int protocol_openssl_dummy_variable;
+int protocol_openssl_dummy_variable = 0;
+
+#endif
--
2.50.1 (Apple Git-155)
--TDT48G9Q3XiJHnLN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename=v4-0001-Suppress-has-no-symbols-linker-warnings-on-ma.patch.v15
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH v4 1/1] Suppress "has no symbols" linker warnings on macOS.
In-Reply-To: <no-message-id-603094@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox