Print this page
5910 libnisdb won't build with modern GCC
*** 17,28 ****
--- 17,31 ----
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2015 Gary Mills
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2015 RackTop Systems.
*/
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
*** 212,222 ****
if (stat != 0) {
(void) mutex_unlock(&table->mapping.enumLock);
logmsg(MSG_NOTIMECHECK, LOG_WARNING,
"%s: Error %d creating new thread; using current one",
myself, stat);
! stat = (int)entriesFromLDAPthread(arg);
return (stat);
}
table->mapping.enumTid = tid;
table->mapping.enumStat = -1;
--- 215,225 ----
if (stat != 0) {
(void) mutex_unlock(&table->mapping.enumLock);
logmsg(MSG_NOTIMECHECK, LOG_WARNING,
"%s: Error %d creating new thread; using current one",
myself, stat);
! stat = entriesFromLDAPreal(arg);
return (stat);
}
table->mapping.enumTid = tid;
table->mapping.enumStat = -1;
*** 255,265 ****
}
}
#endif /* FORCE_SYNCHRONOUS */
} else {
(void) mutex_unlock(&table->mapping.enumLock);
! stat = (int)entriesFromLDAPthread(arg);
}
return (stat);
}
--- 258,268 ----
}
}
#endif /* FORCE_SYNCHRONOUS */
} else {
(void) mutex_unlock(&table->mapping.enumLock);
! stat = entriesFromLDAPreal(arg);
}
return (stat);
}
*** 271,281 ****
* C++ function.
*/
static void *
entriesFromLDAPthread(void *voidarg) {
__entries_from_ldap_arg_t *arg;
- int stat;
db *dbase;
db_table_desc *tbl = 0;
char *tableName;
arg = (__entries_from_ldap_arg_t *)voidarg;
--- 274,283 ----
*** 309,328 ****
#endif /* NISDB_LDAP_DEBUG */
sfree(tableName);
tableName = 0;
}
! stat = entriesFromLDAPreal(arg);
(void) __nis_ulock_db_table(arg->tableName, 1, 0,
"entriesFromLDAPthread");
freeQuery(arg->q);
if (arg->dirObj != 0)
nis_destroy_object(arg->dirObj);
sfree(arg);
! return ((void *)stat);
}
}
int
--- 311,330 ----
#endif /* NISDB_LDAP_DEBUG */
sfree(tableName);
tableName = 0;
}
! (void) entriesFromLDAPreal(arg);
(void) __nis_ulock_db_table(arg->tableName, 1, 0,
"entriesFromLDAPthread");
freeQuery(arg->q);
if (arg->dirObj != 0)
nis_destroy_object(arg->dirObj);
sfree(arg);
! return (NULL);
}
}
int