From 915c680f5211d36de3ca59503c956055da78f890 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 10 Oct 2020 14:29:28 +0100 Subject: [PATCH] DragonFlyBSD build fix. --- src/backends/generic/misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/generic/misc.c b/src/backends/generic/misc.c index e2b96150..fb660cc3 100644 --- a/src/backends/generic/misc.c +++ b/src/backends/generic/misc.c @@ -33,7 +33,7 @@ #include // readlink(), amongst others #endif -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #include // for sysctl() to get path to executable #endif @@ -93,11 +93,11 @@ static void SetExecutablePath(char* exePath) exePath[len] = '\0'; } -#elif defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) // the sysctl should also work when /proc/ is not mounted (which seems to // be common on FreeBSD), so use it.. -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) int name[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; #else int name[4] = {CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME};