0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/net/iodine/patches/100-musl-compatibility.patch
Ilya Lipnitskiy 5d8d4fbbcb treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

25 lines
884 B
Diff

commit 9603c1848ddd4d9bb2d6ab031fcef91f543b71a0
Author: Maxim Storchak <m.storchak@gmail.com>
Date: Thu Jun 25 19:38:24 2015 +0300
Fix compatibility with musl for OpenWRT
This patch breaks builds for Windows and Android, but since the only
libc flavors OpenWRT currently cares about are musl, uClibc and glibc,
this should be fine.
The reason for such brutal intrusiuon is explained in musl FAQ:
http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
--- a/src/common.c
+++ b/src/common.c
@@ -57,7 +57,7 @@
const unsigned char raw_header[RAW_HDR_LEN] = { 0x10, 0xd1, 0x9e, 0x00 };
/* daemon(3) exists only in 4.4BSD or later, and in GNU libc */
-#if !defined(ANDROID) && !defined(WINDOWS32) && !(defined(BSD) && (BSD >= 199306)) && !defined(__GLIBC__)
+#ifdef __NO_DAEMON__
static int daemon(int nochdir, int noclose)
{
int fd, i;