Avoid a warning if _BSD_SOURCE is already defined.

As _BSD_SOURCE has been deprecated since glibc 2.20, also add
_DEFAULT_SOURCE to the definitions. Both can be any value as long
as they're defined, so in order to save two lines, just #undef
them instead of checking with #ifdef/#endif.
This commit is contained in:
Jakob Petsovits 2015-07-14 17:50:08 -04:00
parent 27fe9822ad
commit 4853d0250f
1 changed files with 4 additions and 1 deletions

View File

@ -278,7 +278,10 @@ done:
}
}
# else
# define _BSD_SOURCE
# undef _BSD_SOURCE
# define _BSD_SOURCE // deprecated since glibc 2.20
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
# include <sys/uio.h>
# endif
#endif