Apparently we need to set: `#define _GNU_SOURCE ` before we #include <pthread.h> Not sure how portable that is. We could also revert it.