diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index afb89cab308b..5832cb8c6799 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -971,7 +971,7 @@ dns_group(void *retval, void *mdata, va_list ap) hes = NULL; name = NULL; gid = (gid_t)-1; - how = (enum nss_lookup_type)mdata; + how = (enum nss_lookup_type)(uintptr_t)mdata; switch (how) { case nss_lt_name: name = va_arg(ap, const char *); diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index a07ee109e2df..bc1d341fd3ad 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -1108,7 +1108,7 @@ dns_passwd(void *retval, void *mdata, va_list ap) hes = NULL; name = NULL; uid = (uid_t)-1; - how = (enum nss_lookup_type)mdata; + how = (enum nss_lookup_type)(uintptr_t)mdata; switch (how) { case nss_lt_name: name = va_arg(ap, const char *);