mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Ignore SASL deprecation warnings on OS-X
Apple have annotated all SASL functions as deprecated for unknown reasons. Since they still work, lets just ignore the warnings. If Apple finally delete the SASL functions our configure check should already catch that Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
354191c5f1
commit
f7d7825d06
@ -265,6 +265,10 @@
|
|||||||
_Pragma ("GCC diagnostic push") \
|
_Pragma ("GCC diagnostic push") \
|
||||||
_Pragma ("GCC diagnostic ignored \"-Wcast-align\"")
|
_Pragma ("GCC diagnostic ignored \"-Wcast-align\"")
|
||||||
|
|
||||||
|
# define VIR_WARNINGS_NO_DEPRECATED \
|
||||||
|
_Pragma ("GCC diagnostic push") \
|
||||||
|
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||||
|
|
||||||
# if HAVE_SUGGEST_ATTRIBUTE_FORMAT
|
# if HAVE_SUGGEST_ATTRIBUTE_FORMAT
|
||||||
# define VIR_WARNINGS_NO_PRINTF \
|
# define VIR_WARNINGS_NO_PRINTF \
|
||||||
_Pragma ("GCC diagnostic push") \
|
_Pragma ("GCC diagnostic push") \
|
||||||
@ -289,6 +293,7 @@
|
|||||||
_Pragma ("GCC diagnostic pop")
|
_Pragma ("GCC diagnostic pop")
|
||||||
# else
|
# else
|
||||||
# define VIR_WARNINGS_NO_CAST_ALIGN
|
# define VIR_WARNINGS_NO_CAST_ALIGN
|
||||||
|
# define VIR_WARNINGS_NO_DEPRECATED
|
||||||
# define VIR_WARNINGS_NO_PRINTF
|
# define VIR_WARNINGS_NO_PRINTF
|
||||||
# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
|
# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
|
||||||
# define VIR_WARNINGS_RESET
|
# define VIR_WARNINGS_RESET
|
||||||
|
@ -73,6 +73,14 @@ static int virNetSASLContextOnceInit(void)
|
|||||||
|
|
||||||
VIR_ONCE_GLOBAL_INIT(virNetSASLContext)
|
VIR_ONCE_GLOBAL_INIT(virNetSASLContext)
|
||||||
|
|
||||||
|
/* Apple have annotated all SASL functions as deprecated for
|
||||||
|
* unknown reasons. Since they still work, lets just ignore
|
||||||
|
* the warnings. If Apple finally delete the SASL functions
|
||||||
|
* our configure check should already catch that
|
||||||
|
*/
|
||||||
|
#ifdef __APPLE__
|
||||||
|
VIR_WARNINGS_NO_DEPRECATED
|
||||||
|
#endif
|
||||||
|
|
||||||
virNetSASLContextPtr virNetSASLContextNewClient(void)
|
virNetSASLContextPtr virNetSASLContextNewClient(void)
|
||||||
{
|
{
|
||||||
@ -686,3 +694,7 @@ void virNetSASLSessionDispose(void *obj)
|
|||||||
sasl_dispose(&sasl->conn);
|
sasl_dispose(&sasl->conn);
|
||||||
VIR_FREE(sasl->callbacks);
|
VIR_FREE(sasl->callbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
VIR_WARNINGS_RESET
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user