summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro2022-12-16 04:36:22 +0000
committerThomas Munro2022-12-16 04:36:22 +0000
commite52f8b301ed54aac5162b185b43f5f1e44b6b17e (patch)
tree7fd24f655021819ad2ab635e709267f2c9107bcb
parent4a29eabd1d91c5484426bc5836e0a7143b064f5a (diff)
Fix typo in reference to __FreeBSD__.
Commit a2a8acd152 introduced a platform-dependent mechanism to prevent developers from referencing errno in the argument list of elog()/ereport(), but didn't use the right macro to detect FreeBSD, so it didn't actually work there. Reported-by: Japin Li <[email protected]> Discussion: https://postgr.es/m/MEYP282MB16693AAEEF84F47D8F7CA007B6E69%40MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
-rw-r--r--src/include/utils/elog.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 8025dce335..6e50c8580e 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -89,7 +89,7 @@ struct Node;
*/
#if defined(errno) && defined(__linux__)
#define pg_prevent_errno_in_scope() int __errno_location pg_attribute_unused()
-#elif defined(errno) && (defined(__darwin__) || defined(__freebsd__))
+#elif defined(errno) && (defined(__darwin__) || defined(__FreeBSD__))
#define pg_prevent_errno_in_scope() int __error pg_attribute_unused()
#else
#define pg_prevent_errno_in_scope()