$NetBSD: patch-src_lib_libast_features_syscall,v 1.4 2023/07/03 10:44:08 vins Exp $

On NetBSD, use `SYS___getcwd' to get the getcwd(2) syscall.

--- src/lib/libast/features/syscall.orig	2023-06-13 17:22:26.000000000 +0000
+++ src/lib/libast/features/syscall
@@ -4,7 +4,11 @@ lib	sysgetcwd note{ syscall(SYS_getcwd,b
 	int main(void)
 	{
 		char	buf[256];
+	#ifdef __NetBSD__
+		return syscall(SYS___getcwd, buf, sizeof(buf)) < 0;
+	#else
 		return syscall(SYS_getcwd, buf, sizeof(buf)) < 0;
+	#endif
 	}
 }end
 
@@ -14,6 +18,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
