pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/dosbox-x/patches dosbox-x: add patch, missed...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/261836c93376
branches:  trunk
changeset: 456835:261836c93376
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Aug 10 11:04:15 2021 +0000

description:
dosbox-x: add patch, missed in previous

diffstat:

 emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c |  37 ++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r d0abbcde8993 -r 261836c93376 emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/dosbox-x/patches/patch-src_libs_physfs_physfs__platform__unix.c Tue Aug 10 11:04:15 2021 +0000
@@ -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();



Home | Main Index | Thread Index | Old Index