0009-uclibc-ai-addrconfig.patch 989 B

123456789101112131415161718192021222324252627
  1. Only enable getifaddrs support when available
  2. On uClibc, the ifaddrs.h support is optional. While the default
  3. Buildroot uClibc configuration has it enabled, some external
  4. toolchains may not. Therefore this patch detects that and adjusts
  5. softether usage of ifaddrs accordingly.
  6. Based on an initial patch from Bernd Kuhls.
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. Index: b/src/Mayaqua/Mayaqua.h
  9. ===================================================================
  10. --- a/src/Mayaqua/Mayaqua.h
  11. +++ b/src/Mayaqua/Mayaqua.h
  12. @@ -235,9 +235,11 @@
  13. #ifdef OS_UNIX
  14. #ifndef UNIX_SOLARIS
  15. #ifndef CPU_SH4
  16. +#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
  17. // Getifaddrs system call is supported on UNIX other than Solaris.
  18. // However, it is not supported also by the Linux on SH4 CPU
  19. #define MAYAQUA_SUPPORTS_GETIFADDRS
  20. +#endif // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
  21. #endif // CPU_SH4
  22. #endif // UNIX_SOLARIS
  23. #endif // OS_UNIX