Defining __USE_XOPEN_EXTENDED was the wrong thing. Instead, define