summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Bossart2026-04-29 17:25:09 +0000
committerNathan Bossart2026-04-29 17:25:09 +0000
commit05f6c9ec2c475fae8fdd56ae40bd01afcf70d1f2 (patch)
treec138834d4a96951c5a8667795de186d6a9c91cc8
parent89df812eb890814b105d871185935b580478e660 (diff)
Suppress "has no symbols" linker warnings on macOS.REL_13_STABLE
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. Per project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Reported-by: Zhang Mingli <zmlpostgres@gmail.com> Reviewed-by: John Naylor <johncnaylorls@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/229aaaf3-f529-44ed-8e50-00cb6909af21%40Spark Backpatch-through: 13
-rw-r--r--src/common/protocol_openssl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/protocol_openssl.c b/src/common/protocol_openssl.c
index bf6c62410da..ffe9a2e88be 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 /* !SSL_CTX_set_min_proto_version */
+
+/* prevent linker complaints about empty module */
+extern int protocol_openssl_dummy_variable;
+int protocol_openssl_dummy_variable = 0;
+
+#endif /* SSL_CTX_set_min_proto_version */