summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2020-11-09 10:24:51 +0200
committerPanu Matilainen <pmatilai@redhat.com>2020-12-10 13:28:07 +0200
commit8dc62c7dbdae10d1ea4b210e9f75f36eb4c16aa1 (patch)
treec0f48cb6b24289ca7b9a48a3c76a78311034e624 /lib
parent4d3b57bed1e78936b86377efe9c4b92a731c7f8b (diff)
downloadrpm-8dc62c7dbdae10d1ea4b210e9f75f36eb4c16aa1.tar.gz
Eliminate use of obsolete gethostbyname() function
We only actually used gethostbyname() for canonicalizing buildhost, convert that to use getaddrinfo() instead, which actually has an option for retrieving exactly what we want. The other "use" was to initialize name services, but as we don't need or use hostnames for any operation, we can just as well drop it. User and group names are what we care about. (cherry picked from commit c223d84fbf1ebb7a862f297e65878a2a78653e8e)
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmug.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/rpmug.c b/lib/rpmug.c
index 119d8e585..2de62111c 100644
--- a/lib/rpmug.c
+++ b/lib/rpmug.c
@@ -174,7 +174,6 @@ static void loadLibs(void)
endpwent();
(void) getgrnam(GID_0_GROUP);
endgrent();
- (void) gethostbyname("localhost");
}
int rpmugInit(void)