Workaround for -D_XOPEN_SOURCE not being picked up from command line.

No idea why this is needed yet, but it lets things compile for now.

Change-Id: I5745fe06317ae50f643439675d78fba0f74393ad
Get past the fstatat() and similar warnings.

Change-Id: Ifbc295ef74e5961334a6c5ebb9052748c855bc25