From 3e63d41ba196d19e8c4f82b34099b7653682f728 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Fri, 23 Jun 2023 21:53:12 +0200 Subject: [PATCH 1/4] Add support for berkeley-unix (seen on NetBSD) --- core/tsc-dyn-get.el | 2 +- lisp/tree-sitter-load.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tsc-dyn-get.el b/core/tsc-dyn-get.el index 35fecc80..e1e44c96 100644 --- a/core/tsc-dyn-get.el +++ b/core/tsc-dyn-get.el @@ -72,7 +72,7 @@ this to nil." (pcase system-type ('windows-nt "dll") ('darwin "dylib") - ((or 'gnu 'gnu/linux 'gnu/kfreebsd) "so") + ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix) "so") ((or 'ms-dos 'cygwin) (error "Unsupported system-type %s" system-type)) (_ "so"))) diff --git a/lisp/tree-sitter-load.el b/lisp/tree-sitter-load.el index 95114506..11102755 100644 --- a/lisp/tree-sitter-load.el +++ b/lisp/tree-sitter-load.el @@ -32,7 +32,7 @@ See `tree-sitter-require'.") (pcase system-type ;; The CLI tool outputs `.so', but `.dylib' is more sensible on macOS. ('darwin (list ".dylib" ".so")) - ('gnu/linux (list ".so")) + ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix) "so") ('windows-nt (list ".dll")) (_ (error "Unsupported system-type %s" system-type))) "List of suffixes for shared libraries that define tree-sitter languages.") From 27b5548174d35404f290b9e66347b71ce505f3b3 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Fri, 23 Jun 2023 21:53:28 +0200 Subject: [PATCH 2/4] Handle NetBSD like Linux in build. --- bin/env.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/env.bash b/bin/env.bash index d48f4561..ec156ebc 100644 --- a/bin/env.bash +++ b/bin/env.bash @@ -1,7 +1,7 @@ set -euo pipefail system=$(uname) -if [[ $system == "Linux" ]]; then +if [[ $system == "Linux" ]] || [[ $system == "NetBSD" ]]; then ext="so" elif [[ $system == "Darwin" ]]; then ext="dylib" From 36fc517a537402cc5c7f9c6f7a0aca3446875658 Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Fri, 21 Nov 2025 02:38:04 -0800 Subject: [PATCH 3/4] fix: list --- lisp/tree-sitter-load.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/tree-sitter-load.el b/lisp/tree-sitter-load.el index 90e06c8a..9ca4ede2 100644 --- a/lisp/tree-sitter-load.el +++ b/lisp/tree-sitter-load.el @@ -33,7 +33,7 @@ See `tree-sitter-require'.") (pcase system-type ;; The CLI tool outputs `.so', but `.dylib' is more sensible on macOS. ('darwin (list ".dylib" ".so")) - ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix 'android) "so") + ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix 'android) (list "so")) ('windows-nt (list ".dll")) (_ (error "Unsupported system-type %s" system-type))) "List of suffixes for shared libraries that define tree-sitter languages.") From 89a65627dd413748ebc1c74a9912079d0046723a Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Fri, 21 Nov 2025 02:45:12 -0800 Subject: [PATCH 4/4] fix: missing dot --- lisp/tree-sitter-load.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/tree-sitter-load.el b/lisp/tree-sitter-load.el index 9ca4ede2..6dd50f49 100644 --- a/lisp/tree-sitter-load.el +++ b/lisp/tree-sitter-load.el @@ -33,7 +33,7 @@ See `tree-sitter-require'.") (pcase system-type ;; The CLI tool outputs `.so', but `.dylib' is more sensible on macOS. ('darwin (list ".dylib" ".so")) - ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix 'android) (list "so")) + ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix 'android) (list ".so")) ('windows-nt (list ".dll")) (_ (error "Unsupported system-type %s" system-type))) "List of suffixes for shared libraries that define tree-sitter languages.")