Skip to content

Commit c3d04d0

Browse files
committed
Platform (NetBSD): fix exe path detection
1 parent 49902d8 commit c3d04d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/platform/FFPlatform_unix.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ static void getExePath(FFPlatform* platform)
2929
if(sysctl(
3030
(int[]){CTL_KERN,
3131
#ifdef __FreeBSD__
32-
KERN_PROC,
32+
KERN_PROC, KERN_PROC_PATHNAME, (int) getpid()
3333
#else
34-
KERN_PROC_ARGS,
34+
KERN_PROC_ARGS, (int) getpid(), KERN_PROC_PATHNAME
3535
#endif
36-
KERN_PROC_PATHNAME, (int) getpid()}, 4,
36+
}, 4,
3737
exePath, &exePathLen,
3838
NULL, 0
3939
) < 0)
@@ -185,7 +185,7 @@ static void getSysinfo(FFPlatformSysinfo* info, const struct utsname* uts)
185185
ffStrbufAppendS(&info->architecture, uts->machine);
186186
ffStrbufInit(&info->displayVersion);
187187

188-
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__)
188+
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
189189
size_t length = sizeof(info->pageSize);
190190
sysctl((int[]){ CTL_HW, HW_PAGESIZE }, 2, &info->pageSize, &length, NULL, 0);
191191
#else

0 commit comments

Comments
 (0)