add compatibility code for older GResolver

This commit is contained in:
Ailin Nemui 2026-01-24 18:05:05 +01:00
commit e9281b2f11
2 changed files with 53 additions and 0 deletions

View file

@ -16,6 +16,19 @@
# endif
#endif
#if GLIB_CHECK_VERSION(2, 59, 0)
/* nothing */
#else
/* compatibility code for old GLib */
typedef enum {
G_RESOLVER_NAME_LOOKUP_FLAGS_DEFAULT = 0,
G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY = 1 << 0,
G_RESOLVER_NAME_LOOKUP_FLAGS_IPV6_ONLY = 1 << 1,
} GResolverNameLookupFlags;
#endif
struct _IPADDR {
unsigned short family;
struct in6_addr ip;