aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-11-26 17:00:29 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-11-26 17:00:29 -0300
commit1b1e4bfe7da770ad159c0f4291925a3597a65dbc (patch)
tree6d7a9e4682eab1ebd2ac7de6015814308d7f65dc /src
parent2187a229410f12168d48eb41fce22ba348b2b757 (diff)
downloadpostgresql-1b1e4bfe7da770ad159c0f4291925a3597a65dbc.tar.gz
postgresql-1b1e4bfe7da770ad159c0f4291925a3597a65dbc.zip
Harden be-gssapi-common.h for headerscheck
Surround the contents with a test that the feature is enabled by configure, to silence header checking tools on systems without GSSAPI installed. Backpatch to 12, where the file appeared. Discussion: https://postgr.es/m/202111161709.u3pbx5lxdimt@alvherre.pgsql
Diffstat (limited to 'src')
-rw-r--r--src/include/libpq/be-gssapi-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/libpq/be-gssapi-common.h b/src/include/libpq/be-gssapi-common.h
index c07d7e7c5ae..c2215f6ce7c 100644
--- a/src/include/libpq/be-gssapi-common.h
+++ b/src/include/libpq/be-gssapi-common.h
@@ -14,6 +14,8 @@
#ifndef BE_GSSAPI_COMMON_H
#define BE_GSSAPI_COMMON_H
+#ifdef ENABLE_GSS
+
#if defined(HAVE_GSSAPI_H)
#include <gssapi.h>
#else
@@ -23,4 +25,6 @@
extern void pg_GSS_error(const char *errmsg,
OM_uint32 maj_stat, OM_uint32 min_stat);
+#endif /* ENABLE_GSS */
+
#endif /* BE_GSSAPI_COMMON_H */