From 99435117fdde5548f56090cf55e0739d5f781427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Sat, 25 Oct 2014 17:29:21 +0200 Subject: uClibc: fix darwin build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uClibc's unifdef tool declares strlcpy(3) which is problematic on OS X. There (and probably on other systems) strlcpy(3) is defined as a macro, re-declaring it here will fail cause the macro expansion will generate an invalid function name. The declaration of strlcpy(3) is however useless cause it is never used in the tool. Also upstream patch 2a021ae81c36f4281883a3195f7ce81504edf978 will remove it. Using that patch here is overkill, cause it rewrites a lot of the unifdef.c code. Signed-off-by: Andreas Bießmann Cc: Yann E. MORIN diff --git a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch b/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch new file mode 100644 index 0000000..884307d --- /dev/null +++ b/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch @@ -0,0 +1,12 @@ +diff -Nrupa uClibc-0.9.33.2.orig/extra/scripts/unifdef.c uClibc-0.9.33.2/extra/scripts/unifdef.c +--- uClibc-0.9.33.2.orig/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/extra/scripts/unifdef.c 2014-10-25 17:07:33.000000000 +0200 +@@ -78,8 +78,6 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/ + #define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); }) + #define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno)) + +-size_t strlcpy(char *dst, const char *src, size_t siz); +- + /* types of input lines: */ + typedef enum { + LT_TRUEI, /* a true #if with ignore flag */ -- cgit v0.10.2-6-g49f6