add -D_BSD_SOURCE for centos/gcc