aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}