summaryrefslogtreecommitdiff
path: root/emulators/dosbox-x
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-08-10 11:04:15 +0000
committernia <nia@pkgsrc.org>2021-08-10 11:04:15 +0000
commit4011f8595b206bfb02f29844a4cb66004183f869 (patch)
tree71b92beb990af8b21dc26ca820a2dc37a516be8a /emulators/dosbox-x
parent487ac7258197eee1a6a32c2fbfc08032ae9418cf (diff)
downloadpkgsrc-4011f8595b206bfb02f29844a4cb66004183f869.tar.gz
dosbox-x: add patch, missed in previous
Diffstat (limited to 'emulators/dosbox-x')
-rw-r--r--emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c b/emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c
new file mode 100644
index 00000000000..6796119c764
--- /dev/null
+++ b/emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_libs_physfs_physfs__platform__unix.c,v 1.1 2021/08/10 11:04:15 nia Exp $
+
+NetBSD support. ideally this should use devel/physfs...
+
+--- src/libs/physfs/physfs_platform_unix.c.orig 2021-08-01 07:45:55.000000000 +0000
++++ src/libs/physfs/physfs_platform_unix.c
+@@ -53,10 +53,14 @@
+ #include <sys/mnttab.h>
+ #endif
+
+-#ifdef PHYSFS_PLATFORM_FREEBSD
++#if defined(PHYSFS_PLATFORM_FREEBSD) || defined(__NetBSD__)
+ #include <sys/sysctl.h>
+ #endif
+
++#ifdef __NetBSD__
++#include <sys/statvfs.h>
++#define statfs statvfs
++#endif
+
+ #include "physfs_internal.h"
+
+@@ -261,6 +265,14 @@ char *__PHYSFS_platformCalcBaseDir(const
+ if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1)
+ retval = __PHYSFS_strdup(fullpath);
+ }
++ #elif defined(__NetBSD__)
++ {
++ char fullpath[PATH_MAX];
++ size_t buflen = sizeof (fullpath);
++ int mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };
++ if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1)
++ retval = __PHYSFS_strdup(fullpath);
++ }
+ #elif defined(PHYSFS_PLATFORM_SOLARIS)
+ {
+ const char *path = getexecname();