diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-05-30 20:20:51 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-08-07 10:08:18 -0500 |
commit | ffded033eb67c0027d650c0a2a0ebaa58f53c94f (patch) | |
tree | b8db4bca8f3217947b30e7aff5fcd65566dbae9d /user/the_silver_searcher/pipe-symlink.patch | |
parent | 4bdc6432893e9ea94a651c61b456c4ad8e063d78 (diff) | |
download | packages-ffded033eb67c0027d650c0a2a0ebaa58f53c94f.tar.gz packages-ffded033eb67c0027d650c0a2a0ebaa58f53c94f.tar.bz2 packages-ffded033eb67c0027d650c0a2a0ebaa58f53c94f.tar.xz packages-ffded033eb67c0027d650c0a2a0ebaa58f53c94f.zip |
user/the_silver_searcher: Patches
* Fix when reading symlinks to pipes.
* Fix build with newer GCC.
Diffstat (limited to 'user/the_silver_searcher/pipe-symlink.patch')
-rw-r--r-- | user/the_silver_searcher/pipe-symlink.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/user/the_silver_searcher/pipe-symlink.patch b/user/the_silver_searcher/pipe-symlink.patch new file mode 100644 index 000000000..ee47f9439 --- /dev/null +++ b/user/the_silver_searcher/pipe-symlink.patch @@ -0,0 +1,26 @@ +From 095c3f091e23fda1d9d00bd42c38cf81bba1c14f Mon Sep 17 00:00:00 2001 +From: Jacob Wahlgren <jacob@dstsrc.net> +Date: Wed, 28 Nov 2018 23:35:52 +0100 +Subject: [PATCH] Skip symlinks to named pipes + +The d_type field contains the type as lstat would put it, but when +checking for a named pipe we need the stat behavior. + +Fixes https://github.com/ggreer/the_silver_searcher/issues/1272 +--- + src/util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util.c b/src/util.c +index cb23914d3..3949477b2 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -516,7 +516,7 @@ int is_symlink(const char *path, const struct dirent *d) { + + int is_named_pipe(const char *path, const struct dirent *d) { + #ifdef HAVE_DIRENT_DTYPE +- if (d->d_type != DT_UNKNOWN) { ++ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) { + return d->d_type == DT_FIFO || d->d_type == DT_SOCK; + } + #endif |