From 1d7282d6a4c3e773419dcf4cde592ce0b04edd93 Mon Sep 17 00:00:00 2001 From: Rich Megginson <rmeggins@xxxxxxxxxx> Date: Fri, 16 Aug 2013 10:51:55 -0600 Subject: [PATCH 2/3] compiler warning - ldif_read_record lineno type depends on openldap version --- lib/libdsa/dsalib_confs.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/libdsa/dsalib_confs.c b/lib/libdsa/dsalib_confs.c index 36d9356..b4a1f4c 100644 --- a/lib/libdsa/dsalib_confs.c +++ b/lib/libdsa/dsalib_confs.c @@ -38,6 +38,18 @@ #include "nspr.h" #include "plstr.h" +/* ldif_read_record lineno argument type depends on openldap version */ +#if defined(USE_OPENLDAP) +#include <ldap_features.h> +#if LDAP_VENDOR_VERSION >= 20434 /* changed in 2.4.34 */ +typedef unsigned long int ldif_record_lineno_t; +#else +typedef int ldif_record_lineno_t; +#endif +#else +typedef int ldif_record_lineno_t; +#endif + int dsalib_ldif_parse_line( char *line, @@ -75,11 +87,11 @@ ds_get_conf_from_file(FILE *conf) int listsize = 0; char **conf_list = NULL; char *entry = 0; - int lineno = 0; - int i = 0; #if defined(USE_OPENLDAP) int buflen = 0; #endif + ldif_record_lineno_t lineno; + int i = 0; #if defined(USE_OPENLDAP) while (ldif_read_record(conf, &lineno, &entry, &buflen)) { -- 1.7.1
-- 389-devel mailing list 389-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/389-devel