genfio: Splitting gen_template in 2 parts
[fio.git] / mutex.c
diff --git a/mutex.c b/mutex.c
index d1e3ceaeff3469be1462ed1af7434f44e8760a72..e1fbb607f1a416fb06a25a611f0f4233c9814357 100644 (file)
--- a/mutex.c
+++ b/mutex.c
@@ -205,9 +205,12 @@ struct fio_rwlock *fio_rwlock_init(void)
                log_err("pthread_rwlockattr_setpshared: %s\n", strerror(ret));
                goto destroy_attr;
        }
-#endif
 
        ret = pthread_rwlock_init(&lock->lock, &attr);
+#else
+       ret = pthread_rwlock_init(&lock->lock, NULL);
+#endif
+
        if (ret) {
                log_err("pthread_rwlock_init: %s\n", strerror(ret));
                goto destroy_attr;