From 4eda808a5784b1bf6b26bdeb557cf1caf56be60c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 9 Jul 2015 18:00:49 +0200 Subject: [PATCH] lib/krb5: add new KRB5_ERROR_CODE() abstraction macro. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Andreas Schneider --- lib/krb5_wrap/krb5_samba.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index 12711e8cd32..cef9144a17e 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -109,6 +109,12 @@ typedef struct { #define KRB5_KEY_DATA_CAST krb5_octet #endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */ +#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR /* Heimdal */ +#define KRB5_ERROR_CODE(k) ((k)->error_code) +#else /* MIT */ +#define KRB5_ERROR_CODE(k) ((k)->error) +#endif /* HAVE_E_DATA_POINTER_IN_KRB5_ERROR */ + krb5_error_code smb_krb5_parse_name(krb5_context context, const char *name, /* in unix charset */ krb5_principal *principal); -- 2.11.4.GIT