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