diff options
Diffstat (limited to 'src/main/native/unix_jni_darwin.cc')
-rw-r--r-- | src/main/native/unix_jni_darwin.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/native/unix_jni_darwin.cc b/src/main/native/unix_jni_darwin.cc index ae7288c3b8..70852a3a86 100644 --- a/src/main/native/unix_jni_darwin.cc +++ b/src/main/native/unix_jni_darwin.cc @@ -20,7 +20,9 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> +#include <sys/sysctl.h> #include <sys/syslimits.h> +#include <sys/types.h> #include <string> @@ -111,3 +113,7 @@ ssize_t portable_lgetxattr(const char *path, const char *name, void *value, errno = ENOSYS; return -1; } + +int portable_sysctlbyname(const char *name_chars, long *mibp, size_t *sizep) { + return sysctlbyname(name_chars, mibp, sizep, NULL, 0); +} |