From 6f2b52bc97318d3177937c3d1b7fb1eb722007a1 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Mon, 7 Oct 2019 20:17:59 -0400 Subject: [PATCH] Expose new Heimdal 8 KRB5_PLUGIN_COMMON_SPI_VERSION macro --- lib/krb5/krb5.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/krb5/krb5.h b/lib/krb5/krb5.h index ea32052f0..7c941673d 100644 --- a/lib/krb5/krb5.h +++ b/lib/krb5/krb5.h @@ -881,6 +881,21 @@ enum krb5_plugin_type { PLUGIN_TYPE_FUNC /* no longer supported */ }; +/* + * Since is new with Heimdal 8, users looking to write + * portable plugins across Heimdal 7 and 8 need a conditional compilation + * predicate from a header file that does exist in both major releases. This + * is as good a place as any to define a plugin source-compatibility version + * number. + * + * When this macro is defined and is equal to 1, the Heimdal 8 plugin source + * API, and header are available and should be used. + * + * In Heimdal 7, this macro is not defined, and may not + * be available. + */ +#define KRB5_PLUGIN_COMMON_SPI_VERSION 1 + #define KRB5_PLUGIN_INVOKE_ALL 1 typedef uintptr_t