From be3c34dd15814d70a410b6fd646a2be7de14a1b5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 8 Sep 2010 13:01:57 +0300 Subject: [PATCH] Fix rpmReadPackageManifest() on non-fpio FD when libio isn't available - With libio, fdGetFILE() works on any io-type, but that's not the case when libio isn't available. Using fdopen() makes it work on both. --- lib/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/manifest.c b/lib/manifest.c index 9ca0c90..020a841 100644 --- a/lib/manifest.c +++ b/lib/manifest.c @@ -68,7 +68,7 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, char *** argvPtr) char ** av = NULL; int argc = (argcPtr ? *argcPtr : 0); char ** argv = (argvPtr ? *argvPtr : NULL); - FILE * f = fdGetFILE(fd); + FILE * f = fdopen(Fileno(fd), "r"); rpmRC rpmrc = RPMRC_OK; int i, j, next, npre; -- 2.7.4