#include "portable.h"
#include <stdio.h>
-#include <sys/types.h>
+
+#include <ac/errno.h>
+#include <ac/unistd.h>
+
#include <sys/stat.h>
#include <fcntl.h>
-#include <unistd.h>
#include "slurp.h"
#include "globals.h"
-#ifdef DECL_SYS_ERRLIST
-extern char *sys_errlist[];
-#endif /* DECL_SYS_ERRLIST */
-
-
/*
* Write a replication record to a reject file. The reject file has the
* same name as the replica's private copy of the file but with ".rej"
FILE *rfp, *lfp;
int rc;
- pthread_mutex_lock( &sglob->rej_mutex );
+ ldap_pvt_thread_mutex_lock( &sglob->rej_mutex );
sprintf( rejfile, "%s/%s:%d.rej", sglob->slurpd_rdir,
ri->ri_hostname, ri->ri_port );
Debug( LDAP_DEBUG_ANY,
"Error: write_reject: Cannot create \"%s\": %s\n",
rejfile, sys_errlist[ errno ], 0 );
- pthread_mutex_unlock( &sglob->rej_mutex );
+ ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
return;
} else {
close( rjfd );
"Error: ldap operation failed, data written to \"%s\"\n",
rejfile, 0, 0 );
}
- pthread_mutex_unlock( &sglob->rej_mutex );
+ ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
return;
}