From this gai_strerror(3p) - Linux manual page my guess is that it is getaddrinfo abbreviated/used as a prefix to “namespace” those functions, I think it only makes sense to use that function if the errnos you are dealing with are part of the same kind / same family of functions.
std.c.E and std.c.EAI (expected by gai_strerror) are different enumerations and I think you shouldn’t pass a value of the former to a function expecting the latter, but I am not super familiar with the APIs.
I don’t think there is a function to convert std.c.E into an error message in the standard library, at least I didn’t find any.