]> git.wh0rd.org - patches.git/blame - pax-utils-grep-style.patch
more random patches. who knows.
[patches.git] / pax-utils-grep-style.patch
CommitLineData
b53d1f41
MF
1--- scanelf.c
2+++ scanelf.c
3@@ -1223,7 +1223,7 @@ static int scanelf_from_file(char *filen
4 char *p;
5 char path[__PAX_UTILS_PATH_MAX];
6
7- if (((strcmp(filename, "-")) == 0) && (ttyname(0) == NULL))
8+ if (strcmp(filename, "-") == 0)
9 fp = stdin;
10 else if ((fp = fopen(filename, "r")) == NULL)
11 return 1;
12@@ -1653,6 +1653,8 @@ static void parseargs(int argc, char *ar
13 load_ld_so_conf(0, "/etc/ld.so.conf");
14 if (scan_ldpath) scanelf_ldpath();
15 if (scan_envpath) scanelf_envpath();
16+ if (!from_file && ttyname(0) == NULL)
17+ from_file = "-";
18 if (from_file) {
19 scanelf_from_file(from_file);
20 from_file = *argv;