_BSD_SOURCE is deprecated so use _DEFAULT_SOURCE instead