aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-12-19 20:40:11 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-12-19 20:40:11 +0000
commit72e8d7b8e7a00f07d0d731afbcf3939058889bf3 (patch)
treedf42235bed389e9de159dcf15598949defbb0367
parentace4dee1da98c83f774f737297f74dc4fea56d8e (diff)
downloadaports-72e8d7b8e7a00f07d0d731afbcf3939058889bf3.tar.bz2
aports-72e8d7b8e7a00f07d0d731afbcf3939058889bf3.tar.xz
main/mg: add missing patch
-rw-r--r--main/mg/musl-fixes.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/main/mg/musl-fixes.patch b/main/mg/musl-fixes.patch
new file mode 100644
index 0000000000..b098d53526
--- /dev/null
+++ b/main/mg/musl-fixes.patch
@@ -0,0 +1,51 @@
+--- mg-20110905.orig/fileio.c
++++ mg-20110905/fileio.c
+@@ -570,7 +570,7 @@
+ #if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */
+ if (strlen(dent->d_name) < len
+ || memcmp(cp, dent->d_name, len) != 0)
+-#elif defined (__GLIBC__) /* Linux uses reclen instead. */
++#elif defined (__linux__) /* Linux uses reclen instead. */
+ if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0)
+ #else
+ if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0)
+--- mg-20110905.orig/sysdef.h
++++ mg-20110905/sysdef.h
+@@ -20,15 +20,13 @@
+
+ /* necesarry to get asprintf & friends with glibc XXX doesn't work for some
+ * mysterious reason! */
+-#ifdef __GLIBC__
+-# define _GNU_SOURCE
+-# define __USE_GNU
+-#endif
++#define _GNU_SOURCE
+ #include <stdio.h>
+
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <fcntl.h>
+ #include <errno.h>
+ #include <signal.h>
+
+--- mg-20110905.orig/theo.c
++++ mg-20110905/theo.c
+@@ -218,14 +218,14 @@
+ {
+ const char *str;
+ int len;
+- uint random;
++ unsigned int random;
+ #ifndef HAVE_ARC4RANDOM
+ struct timeval tv[2];
+
+ gettimeofday(&tv[0], NULL);
+- random = (uint)tv[0].tv_usec;
++ random = (unsigned int)tv[0].tv_usec;
+ #else
+- random = (uint)arc4random();
++ random = (unsigned int)arc4random();
+ #endif
+
+ str = talk[random % ntalk];