[vlc-commits] keystore/keychain: Fix availability build error

Marvin Scholz git at videolan.org
Sat Sep 23 17:25:44 CEST 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Sep 23 17:20:07 2017 +0200| [5892bbaf51ed5b3306832e48fad92114c07ec6a0] | committer: Marvin Scholz

keystore/keychain: Fix availability build error

This fixes a compilation error when partial availability checks
are enforced, as kSecAttrAccessible was not present before
Mavericks. The code already handles it properly, this just disables
the error.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5892bbaf51ed5b3306832e48fad92114c07ec6a0
---

 modules/keystore/keychain.m | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/keystore/keychain.m b/modules/keystore/keychain.m
index 8d05ee31a5..3d1f94c68c 100644
--- a/modules/keystore/keychain.m
+++ b/modules/keystore/keychain.m
@@ -207,6 +207,8 @@ static NSString * ErrorForStatus(OSStatus status)
 #define OSX_MAVERICKS (NSAppKitVersionNumber >= 1265)
 extern const CFStringRef kSecAttrAccessible;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpartial-availability"
 static void SetAccessibilityForQuery(vlc_keystore *p_keystore,
                                      NSMutableDictionary *query)
 {
@@ -240,6 +242,7 @@ static void SetAccessibilityForQuery(vlc_keystore *p_keystore,
             break;
     }
 }
+#pragma clang diagnostic pop
 
 static void SetAttributesForQuery(const char *const ppsz_values[KEY_MAX], NSMutableDictionary *query, const char *psz_label)
 {



More information about the vlc-commits mailing list