aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-07-18 14:13:07 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-07-18 14:13:07 +0000
commit469acd14bc4e31a556744f9a1187310f06b9bc8a (patch)
tree5f1de4083f7ad7f1766acab809527df9edf4daba
parentb45a5c47e210cf5795e5b3206e725f0c4ca428c2 (diff)
downloadrpmtools-469acd14bc4e31a556744f9a1187310f06b9bc8a.tar
rpmtools-469acd14bc4e31a556744f9a1187310f06b9bc8a.tar.gz
rpmtools-469acd14bc4e31a556744f9a1187310f06b9bc8a.tar.bz2
rpmtools-469acd14bc4e31a556744f9a1187310f06b9bc8a.tar.xz
rpmtools-469acd14bc4e31a556744f9a1187310f06b9bc8a.zip
fdFileno & fdOpen has been dead since rpm 3.0.3, update code..
-rw-r--r--parsehdlist.c4
-rw-r--r--rpm2header.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/parsehdlist.c b/parsehdlist.c
index f460961..5440adb 100644
--- a/parsehdlist.c
+++ b/parsehdlist.c
@@ -402,7 +402,7 @@ int main(int argc, char **argv)
FD_t fd;
pid_t pid = 0;
if (strcmp(argv[i], "-") == 0) fd = fdDup(STDIN_FILENO);
- else if (raw_hdlist) fd = fdOpen(argv[i], O_RDONLY, 0);
+ else if (raw_hdlist) fd = Fopen(argv[i], "r");
else {
int fdno[2];
if (!pipe(fdno)) {
@@ -470,7 +470,7 @@ int main(int argc, char **argv)
if (!silent) { fprintf(stderr, "parsehdlist: unable to create pipe for parsehdlist\n"); }
}
}
- if (fdFileno(fd) < 0) {
+ if (Fileno(fd) < 0) {
if (!silent) { fprintf(stderr, "parsehdlist: cannot open file %s\n", argv[i]); }
exit(1);
} else {
diff --git a/rpm2header.c b/rpm2header.c
index b8c2cb4..0055ed0 100644
--- a/rpm2header.c
+++ b/rpm2header.c
@@ -22,7 +22,7 @@ const char *basename(const char *f) {
int_32 FD_size(FD_t fd) {
struct stat sb;
- fstat(fdFileno(fd), &sb);
+ fstat(Fileno(fd), &sb);
return sb.st_size;
}
@@ -46,7 +46,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "%s\n", argv[i]);
- if (!(fd = fdOpen(argv[i], O_RDONLY, 0666))) {
+ if (!(fd = Fopen(argv[i], "r"))) {
perror("open");
exit(1);
}