From f76fd05bae047103cb36ef5fb82137c8995142c1 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 26 Nov 2021 17:00:29 -0300 Subject: [PATCH] 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 --- src/include/libpq/be-gssapi-common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/include/libpq/be-gssapi-common.h b/src/include/libpq/be-gssapi-common.h index e1c23ac545..02109057c7 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 #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 */