pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ksh93u+: Fix for getcwd() call on NetBSD.
Module Name: pkgsrc-wip
Committed By: Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By: vms
Date: Sun Jul 3 11:01:55 2022 +0200
Changeset: 78cf962d1cb74b0462e08f41615e510e46d1504d
Modified Files:
ksh93u+/distinfo
Added Files:
ksh93u+/patches/patch-src_lib_libast_features_syscall
Log Message:
ksh93u+: Fix for getcwd() call on NetBSD.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=78cf962d1cb74b0462e08f41615e510e46d1504d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
ksh93u+/distinfo | 1 +
.../patches/patch-src_lib_libast_features_syscall | 32 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
diffs:
diff --git a/ksh93u+/distinfo b/ksh93u+/distinfo
index 1582a9cfca..7729b98f85 100644
--- a/ksh93u+/distinfo
+++ b/ksh93u+/distinfo
@@ -3,3 +3,4 @@ $NetBSD$
BLAKE2s (v1.0.0-beta.2.tar.gz) = 1852a7f7963978ea6b80d47a915fe0da868bb91f8d9830056dfc6ea1b3303165
SHA512 (v1.0.0-beta.2.tar.gz) = c2cd5a4b442bcff1dd2c1c054ee79c4cb131dce28d811dcd3476164d6cb7e88e6b317a094b16f227564a1266708ef0cfeca2af0929c00a19497cf1b67c647cf2
Size (v1.0.0-beta.2.tar.gz) = 2238224 bytes
+SHA1 (patch-src_lib_libast_features_syscall) = 725fead538810678e808c6fdfd543fa1a0415645
diff --git a/ksh93u+/patches/patch-src_lib_libast_features_syscall b/ksh93u+/patches/patch-src_lib_libast_features_syscall
new file mode 100644
index 0000000000..6c26c6c35b
--- /dev/null
+++ b/ksh93u+/patches/patch-src_lib_libast_features_syscall
@@ -0,0 +1,32 @@
+$NetBSD$
+
+On NetBSD, use `SYS___getcwd' to get the getcwd(2) syscall.
+
+--- src/lib/libast/features/syscall.orig 2021-12-17 03:20:04.000000000 +0000
++++ src/lib/libast/features/syscall
+@@ -1,9 +1,13 @@
+-lib sysgetcwd note{ syscall(SYS_getcwd,buf,len) implemented }end link{
++lib sysgetcwd note{ syscall(SYS_getcwd/SYS___getcwd,buf,len) implemented }end link{
+ #include <sys/syscall.h>
+ int main()
+ {
+ char buf[256];
++ #ifdef __NetBSD__
++ return syscall(SYS___getcwd, buf, sizeof(buf)) < 0;
++ #else
+ return syscall(SYS_getcwd, buf, sizeof(buf)) < 0;
++ #endif
+ }
+ }end
+
+@@ -13,6 +17,10 @@ if ( _lib_sysgetcwd ) {
+ endif
+
+ if ( _lib_sysgetcwd ) {
++ #ifdef __NetBSD__
++ #define SYSGETCWD(a,b) syscall(SYS___getcwd,a,b)
++ #else
+ #define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
++ #endif
+ }
+ endif
Home |
Main Index |
Thread Index |
Old Index