aboutsummaryrefslogtreecommitdiff
path: root/darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'darwin.c')
-rw-r--r--darwin.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/darwin.c b/darwin.c
index 9167dc2..843ee93 100644
--- a/darwin.c
+++ b/darwin.c
@@ -1,7 +1,7 @@
#if defined(__APPLE__)
#include "common.h"
-char *get_sys_product() {
+char *get_sys_product_darwin() {
char model[100] = {0};
size_t len;
@@ -10,7 +10,7 @@ char *get_sys_product() {
return strdup(model);
}
-size_t get_sys_memory() {
+ssize_t get_sys_memory() {
size_t mem_size;
size_t len;
@@ -21,18 +21,18 @@ size_t get_sys_memory() {
return mem_size / 1024;
}
-int *get_sys_os_dist(char **a, char **b) {
- char version[255] = {0};
+int get_sys_os_dist(char **name, char **version) {
size_t version_len;
+ char data[255] = {0};
version_len = sizeof(version);
- sysctlbyname("kern.osproductversion", version, &version_len, NULL, 0);
- *a = strdup("MacOS");
- *b = strdup(version);
+ sysctlbyname("kern.osproductversion", data, &version_len, NULL, 0);
+ *name = strdup("MacOS");
+ *version = strdup(data);
return 0;
}
-void *get_block_devices(void *x) {
+struct Block_Device **get_block_devices(size_t *total) {
return NULL;
}
-#endif \ No newline at end of file
+#endif