xref: /OK3568_Linux_fs/buildroot/package/softether/0009-uclibc-ai-addrconfig.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunOnly enable getifaddrs support when available
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunOn uClibc, the ifaddrs.h support is optional. While the default
4*4882a593SmuzhiyunBuildroot uClibc configuration has it enabled, some external
5*4882a593Smuzhiyuntoolchains may not. Therefore this patch detects that and adjusts
6*4882a593Smuzhiyunsoftether usage of ifaddrs accordingly.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunBased on an initial patch from Bernd Kuhls.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunIndex: b/src/Mayaqua/Mayaqua.h
13*4882a593Smuzhiyun===================================================================
14*4882a593Smuzhiyun--- a/src/Mayaqua/Mayaqua.h
15*4882a593Smuzhiyun+++ b/src/Mayaqua/Mayaqua.h
16*4882a593Smuzhiyun@@ -235,9 +235,11 @@
17*4882a593Smuzhiyun #ifdef	OS_UNIX
18*4882a593Smuzhiyun #ifndef	UNIX_SOLARIS
19*4882a593Smuzhiyun #ifndef	CPU_SH4
20*4882a593Smuzhiyun+#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
21*4882a593Smuzhiyun // Getifaddrs system call is supported on UNIX other than Solaris.
22*4882a593Smuzhiyun // However, it is not supported also by the Linux on SH4 CPU
23*4882a593Smuzhiyun #define	MAYAQUA_SUPPORTS_GETIFADDRS
24*4882a593Smuzhiyun+#endif  // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
25*4882a593Smuzhiyun #endif	// CPU_SH4
26*4882a593Smuzhiyun #endif	// UNIX_SOLARIS
27*4882a593Smuzhiyun #endif	// OS_UNIX
28