diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-10-07 15:13:57 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2019-10-09 06:08:19 +0200 |
commit | b7a915398a2ee928df4db2c5dd8e308f480c7906 (patch) | |
tree | 5576acedee1a2fc00284913329ede8c4b64ccaf0 /src | |
parent | 9115c7ae451d04fa326cc9df587e2f99d9dc117a (diff) |
QAuthenticator - use GSS framework, as Apple requires
since declarations in gssapi.h are marked as deprecated.
Fixes: QTBUG-78810
Change-Id: I241ae4913f362f6e9219438e9bfe7a63dfc91b7c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/configure.json | 12 | ||||
-rw-r--r-- | src/network/kernel/qauthenticator.cpp | 7 |
2 files changed, 17 insertions, 2 deletions
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 <TargetConditionals.h>", + "# if defined(TARGET_OS_MAC) && TARGET_OS_MAC", + "# include <GSS/GSS.h>", + "# endif", + "#else", + "# include <gssapi/gssapi.h>", + "#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 <security.h> #elif QT_CONFIG(gssapi) // GSSAPI +#if defined(Q_OS_DARWIN) +#include <GSS/GSS.h> +#else #include <gssapi/gssapi.h> -#endif +#endif // Q_OS_DARWIN +#endif // Q_CONFIG(sspi) QT_BEGIN_NAMESPACE |