this fixes a crash on NetBSD because it requires -D_XOPEN_SOURCE (strdup, usleep). thanks k0ga and stateless for reporting and fixing this issue!