aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-12-16 17:36:22 +1300
committerThomas Munro <tmunro@postgresql.org>2022-12-16 17:36:22 +1300
commite52f8b301ed54aac5162b185b43f5f1e44b6b17e (patch)
tree7fd24f655021819ad2ab635e709267f2c9107bcb
parent4a29eabd1d91c5484426bc5836e0a7143b064f5a (diff)
downloadpostgresql-e52f8b301ed54aac5162b185b43f5f1e44b6b17e.tar.gz
postgresql-e52f8b301ed54aac5162b185b43f5f1e44b6b17e.zip
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 <japinli@hotmail.com> 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 8025dce3357..6e50c8580e6 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()