Ticket #23030: patch-main.c
File patch-main.c, 402 bytes (added by jlaurila@…, 15 years ago) |
---|
Line | |
---|---|
1 | --- ../lrzip-0.42-orig/main.c 2009-11-29 23:17:48.000000000 +0200 |
2 | +++ main.c 2009-12-26 00:22:13.000000000 +0200 |
3 | @@ -344,11 +344,11 @@ |
4 | static i64 get_ram(void) |
5 | { |
6 | int mib[2]; |
7 | - i64 len; |
8 | - int *p, ramsize; |
9 | + size_t len; |
10 | + i64 *p, ramsize; |
11 | |
12 | mib[0] = CTL_HW; |
13 | - mib[1] = HW_PHYSMEM; |
14 | + mib[1] = HW_MEMSIZE; |
15 | sysctl(mib, 2, NULL, &len, NULL, 0); |
16 | p = malloc(len); |
17 | sysctl(mib, 2, p, &len, NULL, 0); |