From b7a915398a2ee928df4db2c5dd8e308f480c7906 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 7 Oct 2019 15:13:57 +0200 Subject: QAuthenticator - use GSS framework, as Apple requires MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since declarations in gssapi.h are marked as deprecated. Fixes: QTBUG-78810 Change-Id: I241ae4913f362f6e9219438e9bfe7a63dfc91b7c Reviewed-by: Timur Pocheptsov Reviewed-by: MÃ¥rten Nordheim --- src/network/configure.json | 12 +++++++++++- src/network/kernel/qauthenticator.cpp | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/network/configure.json b/src/network/configure.json index a1cb77b6d1..f501465c91 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -102,13 +102,23 @@ "gssapi": { "label": "KRB5 GSSAPI Support", "test": { + "head": [ + "#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))", + "# include ", + "# if defined(TARGET_OS_MAC) && TARGET_OS_MAC", + "# include ", + "# endif", + "#else", + "# include ", + "#endif" + ], "main": [ "gss_ctx_id_t ctx;", "gss_context_time(nullptr, ctx, nullptr);" ] }, - "headers": [ "gssapi/gssapi.h" ], "sources": [ + { "libs": "-framework GSS", "condition": "config.darwin" }, { "type": "pkgConfig", "args": "krb5-gssapi" }, "-lgssapi_krb5" ] diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 4100dfd784..858a5bc2de 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -1,3 +1,4 @@ + /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. @@ -59,8 +60,12 @@ #define SECURITY_WIN32 1 #include #elif QT_CONFIG(gssapi) // GSSAPI +#if defined(Q_OS_DARWIN) +#include +#else #include -#endif +#endif // Q_OS_DARWIN +#endif // Q_CONFIG(sspi) QT_BEGIN_NAMESPACE -- cgit v1.2.3