darwin: O_CLOEXEC is not defined on Mac OS X 10.6
darwin: add missing <string.h> header for strcpy