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.

27 lines
880 B

  1. The arpa/nameser.h header of musl libc indirectly depends on the endian.h
  2. header but fails to explicitely include it to properly define
  3. `__BYTE_ORDER` and `__BIG_ENDIAN` prior to declaring the DNS `HEADER`
  4. structure.
  5. When both the appropriate `__BYTE_ORDER` and `__BIG_ENDIAN` defines are
  6. unset, the `#if __BYTE_ORDER == __BIG_ENDIAN` condition in `nameser.h`
  7. evaluates to true, causing it to declare a bad (big endian) DNS packet
  8. header structure on little endian systems.
  9. Work around this musl bug by forcibly passing `-include endian.h` through
  10. the `osflags` file.
  11. An upstream fix for musl libc has been submitted with
  12. http://www.openwall.com/lists/musl/2017/12/04/3
  13. --- a/src/osflags
  14. +++ b/src/osflags
  15. @@ -27,7 +27,7 @@ cflags)
  16. echo '-Dsocklen_t=int';
  17. ;;
  18. Linux)
  19. - FLAGS="-D_GNU_SOURCE"
  20. + FLAGS="-D_GNU_SOURCE -include endian.h"
  21. echo $FLAGS;
  22. ;;
  23. esac