]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Ignore SASL deprecation warnings on OS-X
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 7 Apr 2017 14:43:38 +0000 (15:43 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 19 Apr 2017 09:51:51 +0000 (10:51 +0100)
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>
src/internal.h
src/rpc/virnetsaslcontext.c

index b1a05568a3ad64524b2cf566cf56021473d1092b..713734cd076f14d9464dd55595341e678525c653 100644 (file)
     _Pragma ("GCC diagnostic push") \
     _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
 #   define VIR_WARNINGS_NO_PRINTF \
     _Pragma ("GCC diagnostic push") \
     _Pragma ("GCC diagnostic pop")
 # else
 #  define VIR_WARNINGS_NO_CAST_ALIGN
+#  define VIR_WARNINGS_NO_DEPRECATED
 #  define VIR_WARNINGS_NO_PRINTF
 #  define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
 #  define VIR_WARNINGS_RESET
index c4492ecd2c8624e870802bcb5de5949ae2f5f7be..a7b891feb6c51d1b1e818c92f59c8d45b5204988 100644 (file)
@@ -73,6 +73,14 @@ static int virNetSASLContextOnceInit(void)
 
 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)
 {
@@ -686,3 +694,7 @@ void virNetSASLSessionDispose(void *obj)
         sasl_dispose(&sasl->conn);
     VIR_FREE(sasl->callbacks);
 }
+
+#ifdef __APPLE__
+VIR_WARNINGS_RESET
+#endif