mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 17:23:23 +00:00
fix: for netbsd ppl.. https://github.com/DeforaNetworks/proxmark3/commit/6f4b0fce3a10e5ae65d3dcb2c29cca76741ab818 (@khorben )
This commit is contained in:
1 parent
51d1bb2aaa
commit
8d02f4aabc
1 file changed
+6
-1
+6
-1
@@ -557,6 +557,7 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
|
||||
defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
@@ -574,8 +575,12 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
#ifdef KERN_PROC_ARGV
|
||||
int mib[4] = { CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV };
|
||||
#else
|
||||
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||
size_t size = sizeof(buffer1);
|
||||
#endif
|
||||
size_t size = sizeof(buffer1);
|
||||
|
||||
if (sysctl(mib, (u_int)(sizeof(mib) / sizeof(mib[0])), path, &size, NULL, 0) != 0)
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user