Fix rpmReadPackageManifest() on non-fpio FD when libio isn't available
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 8 Sep 2010 10:01:57 +0000 (13:01 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 8 Sep 2010 10:01:57 +0000 (13:01 +0300)
- 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

index 9ca0c90..020a841 100644 (file)
@@ -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;