From: Ruben Kerkhof Date: Fri, 25 Dec 2015 08:39:44 +0000 (+0100) Subject: openldap plugin: fix build on OSX El Capitan X-Git-Tag: collectd-5.5.1~11 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=44acfc8a688797519b9a8cdb0613a59aeeccae25;p=collectd.git openldap plugin: fix build on OSX El Capitan OpenLDAP is deprecated in OSX El Capitan. Apple would like us to use the OpenDirectory Framework instead. Treat these deprecation warnings as warnings, not errors. --- diff --git a/src/openldap.c b/src/openldap.c index 8667058e..bd79b26b 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -31,6 +31,11 @@ #include "plugin.h" #include "configfile.h" +#if defined(__APPLE__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wdeprecated-declarations" +#endif + #include #include @@ -681,3 +686,7 @@ void module_register (void) /* {{{ */ plugin_register_complex_config ("openldap", cldap_config); plugin_register_init ("openldap", cldap_init); } /* }}} void module_register */ + +#if defined(__APPLE__) +#pragma clang diagnostic pop +#endif