zbd: Fix compilation error on BSD
Commit
b76949618d55 ("fio: Generalize zonemode=zbd") enabled zbd.c
compilation on other operating systems than Linux. This caused a
compilation error on NetBSD as follows:
ld: zbd.o: in function `parse_zone_info':
fio/zbd.c:422: undefined reference to `pthread_mutexattr_setpshared'
ld: zbd.o: in function `init_zone_info':
fio/zbd.c:378: undefined reference to `pthread_mutexattr_setpshared'
gmake: *** [Makefile:483: fio] Error 1
Same error is expected on other BSD OSes.
Fix this by initializing mutex using helper functions pshared.c provides.
To initialize mutex with POSIX_MUTEX_RECURSIVE attribute type, utilize
mutex_init_pshared_with_type().
Reported-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fixes:
b76949618d55 ("fio: Generalize zonemode=zbd")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>