v02-0001-approach02-remove-macro-guard-from-sslinfo.patch
application/octet-stream
Filename: v02-0001-approach02-remove-macro-guard-from-sslinfo.patch
Type: application/octet-stream
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v2-0001
| File | + | − |
|---|---|---|
| contrib/sslinfo/sslinfo.c | 0 | 11 |
| src/include/libpq/libpq-be.h | 9 | 0 |
diff --git a/contrib/sslinfo/sslinfo.c b/contrib/sslinfo/sslinfo.c index 5fd46b9874..30cae0bb98 100644 --- a/contrib/sslinfo/sslinfo.c +++ b/contrib/sslinfo/sslinfo.c @@ -19,17 +19,6 @@ #include "miscadmin.h" #include "utils/builtins.h" -/* - * On Windows, <wincrypt.h> includes a #define for X509_NAME, which breaks our - * ability to use OpenSSL's version of that symbol if <wincrypt.h> is pulled - * in after <openssl/ssl.h> ... and, at least on some builds, it is. We - * can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h - * #includes <openssl/ssl.h>. Instead, just zap the #define again here. - */ -#ifdef X509_NAME -#undef X509_NAME -#endif - PG_MODULE_MAGIC; static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName); diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 05cb1874c5..e82514dfbe 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -31,6 +31,15 @@ #else #include <gssapi/gssapi.h> #endif /* HAVE_GSSAPI_H */ +/* + * On Windows, <gssapi/gssapi.h> indirectly includes <wincrypt.h> and defines a macro + * X509_NAME, which breaks our ability to use OpenSSL's version of that symbol + * as <wincrypt.h> is bieng pulled after <openssl/ssl.h>. We can't reliably fix + * that by re-ordering includes. Instead, just zap the #define again here. + */ +#ifdef X509_NAME +#undef X509_NAME +#endif #endif /* ENABLE_GSS */ #ifdef ENABLE_SSPI