summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-12 23:52:49 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-12 23:52:49 -0400
commit6539791c7da12ab9e1dcca445faf1cd0b0bb302a (patch)
treeaedf2919c91da3e05c0ee95965a6597b5956bfca
parentda21718ab320f144e22b6b1147fc8b5d6401870a (diff)
parentc25fa4fb5e58e20ce97c3747c05d26307a70baaa (diff)
downloadbfs-6539791c7da12ab9e1dcca445faf1cd0b0bb302a.tar.xz
Merge tag '3.0.4'
-rw-r--r--GNUmakefile2
-rw-r--r--docs/CHANGELOG.md12
-rw-r--r--src/bfstd.c2
-rw-r--r--src/config.h2
-rwxr-xr-xtests/tests.sh2
5 files changed, 16 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index a5a2a00..45797e2 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -6,7 +6,7 @@ VERSION := $(shell git describe --always 2>/dev/null)
endif
ifndef VERSION
-VERSION := 3.0.3
+VERSION := 3.0.4
endif
ifndef OS
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 253dd46..3b07f01 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,6 +1,18 @@
3.*
===
+3.0.4
+-----
+
+**October 12, 2023**
+
+### Bug Fixes
+
+- Fixed a segfault when reporting errors under musl ([`d40eb87`])
+
+[`d40eb87`]: https://github.com/tavianator/bfs/commit/d40eb87cc00f50a5debb8899eacb7fcf1065badf
+
+
3.0.3
-----
diff --git a/src/bfstd.c b/src/bfstd.c
index e9214d4..a4ae439 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -301,7 +301,7 @@ const char *xstrerror(int errnum) {
}
if (copy != (locale_t)0) {
- ret = strerror_l(errnum, loc);
+ ret = strerror_l(errnum, copy);
}
if (loc == LC_GLOBAL_LOCALE) {
diff --git a/src/config.h b/src/config.h
index 980980a..38ca69b 100644
--- a/src/config.h
+++ b/src/config.h
@@ -22,7 +22,7 @@
# define BFS_COMMAND "bfs"
#endif
#ifndef BFS_VERSION
-# define BFS_VERSION "3.0.3"
+# define BFS_VERSION "3.0.4"
#endif
#ifndef BFS_HOMEPAGE
# define BFS_HOMEPAGE "https://tavianator.com/projects/bfs.html"
diff --git a/tests/tests.sh b/tests/tests.sh
index 662efd9..f233f74 100755
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -495,7 +495,7 @@ elif command -v expect_unbuffer &>/dev/null; then
fi
function bfs_pty() {
- test -n "$UNBUFFER" || skip
+ test -n "${UNBUFFER:-}" || skip
bfs_verbose "$@"
"$UNBUFFER" bash -c 'stty cols 80 rows 24 && "$@"' bash "${BFS[@]}" "$@"