Only provide new libpq sslpasskey hook for openssl-enabled builds
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 17 Apr 2020 18:11:18 +0000 (14:11 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 17 Apr 2020 18:11:18 +0000 (14:11 -0400)
In commit 4dc6355210 I neglected to put #ifdef USE_OPENSSL around the
declarations of the new items. This is remedied here.

Per complaint from Daniel Gustafsson.

src/interfaces/libpq/libpq-fe.h

index c9e6ac2b7699e4e647bd161ee87d01726c5078a7..29799046cf201ba2dde8880a7d5cfe7d9e0ad3ab 100644 (file)
@@ -620,10 +620,12 @@ extern int        pg_valid_server_encoding_id(int encoding);
 /* == in fe-secure-openssl.c === */
 
 /* Support for overriding sslpassword handling with a callback. */
+#ifdef USE_OPENSSL
 typedef int (*PQsslKeyPassHook_type)(char *buf, int size, PGconn *conn);
 extern PQsslKeyPassHook_type PQgetSSLKeyPassHook(void);
 extern void PQsetSSLKeyPassHook(PQsslKeyPassHook_type hook);
 extern int PQdefaultSSLKeyPassHook(char *buf, int size, PGconn *conn);
+#endif
 
 #ifdef __cplusplus
 }