+#if !defined(HAVE_PTHREADS_D4)
+ /* POSIX_THREADS or compatible
+ * This is a draft 10 or standard pthreads implementation
+ */
+ if ( pthread_create( &arg->co_op->o_tid, &attr,
+ connection_operation, (void *) arg ) != 0 ) {
+ Debug( LDAP_DEBUG_ANY, "pthread_create failed\n", 0, 0, 0 );
+ } else {
+ pthread_mutex_lock( &active_threads_mutex );
+ active_threads++;
+ pthread_mutex_unlock( &active_threads_mutex );
+ }
+#else /* pthread draft4 */
+ /*
+ * This is a draft 4 or earlier pthreads implementation
+ */