You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
884 B

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