X-Git-Url: https://git.wh0rd.org/?p=patches.git;a=blobdiff_plain;f=pax-utils-grep-style.patch;fp=pax-utils-grep-style.patch;h=3a2a0883fcd0208fdd245d0ebb3139143dd86e47;hp=0000000000000000000000000000000000000000;hb=b53d1f41b32c8078c755a63c7bf0d2852263ee99;hpb=6d7b707a99652eefa9b245d8f1e0053f3583c79c diff --git a/pax-utils-grep-style.patch b/pax-utils-grep-style.patch new file mode 100644 index 0000000..3a2a088 --- /dev/null +++ b/pax-utils-grep-style.patch @@ -0,0 +1,20 @@ +--- scanelf.c ++++ scanelf.c +@@ -1223,7 +1223,7 @@ static int scanelf_from_file(char *filen + char *p; + char path[__PAX_UTILS_PATH_MAX]; + +- if (((strcmp(filename, "-")) == 0) && (ttyname(0) == NULL)) ++ if (strcmp(filename, "-") == 0) + fp = stdin; + else if ((fp = fopen(filename, "r")) == NULL) + return 1; +@@ -1653,6 +1653,8 @@ static void parseargs(int argc, char *ar + load_ld_so_conf(0, "/etc/ld.so.conf"); + if (scan_ldpath) scanelf_ldpath(); + if (scan_envpath) scanelf_envpath(); ++ if (!from_file && ttyname(0) == NULL) ++ from_file = "-"; + if (from_file) { + scanelf_from_file(from_file); + from_file = *argv;