Backport (simple cherry-pick) 64b6c43379dba176659bc1313b6bb488ac94cfd6
to gingerbread.

Add a new #define IN6_IS_ADDR_ULA, for testing for Universal Local IPv6 Unicast addresses (ULAs). These replace the old site-local IPv6 addresses.
diff --git a/libc/include/netinet/in6.h b/libc/include/netinet/in6.h
index 2f5fee1..efd5c0a 100644
--- a/libc/include/netinet/in6.h
+++ b/libc/include/netinet/in6.h
@@ -60,6 +60,10 @@
 #define IN6_IS_ADDR_SITELOCAL(a)	\
 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
 
+/* RFC 4193. */
+#define IN6_IS_ADDR_ULA(a)	\
+	(((a)->s6_addr[0] & 0xfe) == 0xfc)
+
 #define IN6_IS_ADDR_MULTICAST(a)	\
 	(((__const uint8_t *) (a))[0] == 0xff)