Set _BSD_SOURCE before including string.h to get strlc{at,py} with musl.

This commit is contained in:
Juan RP 2013-03-03 08:21:00 +01:00
parent a517124eae
commit 42274f939c
2 changed files with 4 additions and 0 deletions

View File

@ -36,7 +36,9 @@
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#define _BSD_SOURCE /* musl has strlcpy if _{BSD,GNU}_SOURCE is defined */
#include <string.h>
#undef _BSD_SOURCE
#include <errno.h>
#include <fcntl.h>

View File

@ -30,7 +30,9 @@
#include <stdio.h>
#include <stdlib.h>
#define _BSD_SOURCE
#include <string.h>
#undef _BSD_SOURCE
#include <strings.h>
#include <ctype.h>