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
This commit is contained in:
Alvaro Herrera 2021-11-26 17:00:29 -03:00
parent 1a6f5a0e87
commit f744519326
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
1 changed files with 4 additions and 0 deletions

View File

@ -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 */