Skip to content

Commit

Permalink
do not use the u_int type which is sometimes not defined on FreeBSD, …
Browse files Browse the repository at this point in the history
…see gpakosz#26
  • Loading branch information
gpakosz committed Aug 18, 2021
1 parent e4b7ba1 commit f0fb0a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whereami.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
#endif
size_t size = sizeof(buffer1);

if (sysctl(mib, (u_int)(sizeof(mib) / sizeof(mib[0])), path, &size, NULL, 0) != 0)
if (sysctl(mib, 4, path, &size, NULL, 0) != 0)
break;

resolved = realpath(path, buffer2);
Expand Down

0 comments on commit f0fb0a1

Please sign in to comment.