From 28177def43b71e91db0a9aaf138bf3c388893116 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 Feb 2019 13:48:18 +0100 Subject: [PATCH] gssapi: fix deprecated header warnings Heimdal includes on FreeBSD spewed out lots of them. Less so now. Closes #3566 --- lib/curl_gssapi.h | 16 +--------------- lib/urldata.h | 6 ++++-- tests/libtest/stub_gssapi.c | 18 +++++++++--------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h index 9700a2817..88f68dbbb 100644 --- a/lib/curl_gssapi.h +++ b/lib/curl_gssapi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2011 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2011 - 2019, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,19 +26,6 @@ #include "urldata.h" #ifdef HAVE_GSSAPI - -#ifdef HAVE_GSSGNU -# include -#elif defined HAVE_GSSMIT - /* MIT style */ -# include -# include -# include -#else - /* Heimdal-style */ -# include -#endif - extern gss_OID_desc Curl_spnego_mech_oid; extern gss_OID_desc Curl_krb5_mech_oid; @@ -71,5 +58,4 @@ void Curl_gss_log_error(struct Curl_easy *data, const char *prefix, #define GSSAUTH_P_PRIVACY 4 #endif /* HAVE_GSSAPI */ - #endif /* HEADER_CURL_GSSAPI_H */ diff --git a/lib/urldata.h b/lib/urldata.h index e137569ac..b194fde23 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -129,12 +129,14 @@ typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */ #ifdef HAVE_GSSAPI # ifdef HAVE_GSSGNU # include -# elif defined HAVE_GSSMIT +# elif defined HAVE_GSSAPI_GSSAPI_H # include -# include # else # include # endif +# ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H +# include +# endif #endif #ifdef HAVE_LIBSSH2_H diff --git a/tests/libtest/stub_gssapi.c b/tests/libtest/stub_gssapi.c index 377b75452..873e263dc 100644 --- a/tests/libtest/stub_gssapi.c +++ b/tests/libtest/stub_gssapi.c @@ -44,15 +44,15 @@ enum min_err_code { GSS_LAST }; -const char *min_err_table[] = { - "stub-gss: no error", - "stub-gss: no memory", - "stub-gss: invalid arguments", - "stub-gss: invalid credentials", - "stub-gss: invalid context", - "stub-gss: server returned error", - "stub-gss: cannot find a mechanism", - NULL +static const char *min_err_table[] = { + "stub-gss: no error", + "stub-gss: no memory", + "stub-gss: invalid arguments", + "stub-gss: invalid credentials", + "stub-gss: invalid context", + "stub-gss: server returned error", + "stub-gss: cannot find a mechanism", + NULL }; struct gss_ctx_id_t_desc_struct {