The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / softether / 0007-uclibc-ai-addrconfig.patch
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/softether/0007-uclibc-ai-addrconfig.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/softether/0007-uclibc-ai-addrconfig.patch
new file mode 100644 (file)
index 0000000..7d8f1c6
--- /dev/null
@@ -0,0 +1,27 @@
+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>
+
+Index: b/src/Mayaqua/Mayaqua.h
+===================================================================
+--- a/src/Mayaqua/Mayaqua.h
++++ b/src/Mayaqua/Mayaqua.h
+@@ -235,9 +235,11 @@
+ #ifdef        OS_UNIX\r
+ #ifndef       UNIX_SOLARIS\r
+ #ifndef       CPU_SH4\r
++#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)\r
+ // Getifaddrs system call is supported on UNIX other than Solaris.\r
+ // However, it is not supported also by the Linux on SH4 CPU\r
+ #define       MAYAQUA_SUPPORTS_GETIFADDRS\r
++#endif  // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG\r
+ #endif        // CPU_SH4\r
+ #endif        // UNIX_SOLARIS\r
+ #endif        // OS_UNIX\r