1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 19:39:53 +03:00

Only enable getifaddrs support when available

On uClibc, the ifaddrs.h support is optional. While the default
Buildroot uClibc configuration has it enabled, some external
toolchains may not. Therefore this patch detects that and adjusts
softether usage of ifaddrs accordingly.

Based on an initial patch from Bernd Kuhls.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/softether/0009-uclibc-ai-addrconfig.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
Fabrice Fontaine 2020-03-21 17:54:36 +01:00
parent 60c1e2027d
commit dcecd4c0d5

View File

@ -128,9 +128,11 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
#ifdef OS_UNIX #ifdef OS_UNIX
#ifndef UNIX_SOLARIS #ifndef UNIX_SOLARIS
#ifndef CPU_SH4 #ifndef CPU_SH4
#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
// Getifaddrs system call is supported on UNIX other than Solaris. // Getifaddrs system call is supported on UNIX other than Solaris.
// However, it is not supported also by the Linux on SH4 CPU // However, it is not supported also by the Linux on SH4 CPU
#define MAYAQUA_SUPPORTS_GETIFADDRS #define MAYAQUA_SUPPORTS_GETIFADDRS
#endif // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
#endif // CPU_SH4 #endif // CPU_SH4
#endif // UNIX_SOLARIS #endif // UNIX_SOLARIS
#endif // OS_UNIX #endif // OS_UNIX