2009-12-26 17:00:41 +01:00
|
|
|
[PATCH]: fix build on uClibc without IPv6 support
|
|
|
|
|
|
|
|
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
|
|
|
---
|
|
|
|
gio/ginetaddress.c | 9 +++++++++
|
|
|
|
1 file changed, 9 insertions(+)
|
|
|
|
|
2010-09-16 18:06:38 +02:00
|
|
|
Index: glib-2.26.0/gio/ginetaddress.c
|
2009-12-26 17:00:41 +01:00
|
|
|
===================================================================
|
2010-09-16 18:06:38 +02:00
|
|
|
--- glib-2.26.0.orig/gio/ginetaddress.c
|
|
|
|
+++ glib-2.26.0/gio/ginetaddress.c
|
2009-12-26 17:00:41 +01:00
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#include <features.h>
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
2010-09-16 18:06:38 +02:00
|
|
|
@@ -434,7 +435,11 @@
|
2009-12-26 17:00:41 +01:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)
|
|
|
|
+#define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET)
|
|
|
|
+#else
|
|
|
|
#define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET || (family) == AF_INET6)
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* g_inet_address_new_from_bytes:
|
2010-09-16 18:06:38 +02:00
|
|
|
@@ -483,8 +488,10 @@
|
2009-12-26 17:00:41 +01:00
|
|
|
|
|
|
|
return g_inet_address_new_from_bytes (addr, family);
|
|
|
|
}
|
|
|
|
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__))
|
|
|
|
else
|
|
|
|
return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2010-09-16 18:06:38 +02:00
|
|
|
@@ -510,8 +517,10 @@
|
2009-12-26 17:00:41 +01:00
|
|
|
|
|
|
|
return g_inet_address_new_from_bytes (addr, family);
|
|
|
|
}
|
|
|
|
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__))
|
|
|
|
else
|
|
|
|
return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|