Fix: error: incompatible pointer to integer conversion assigning to 'int' from 'void *' [-Wint-conversion] The Open Group defines brk as returning an int: 0 on success, -1 on failure. On macOS brk returns a void *: the new end of memory on success, -1 on failure. https://github.com/omniti-labs/portableumem/issues/5 --- vmem_sbrk.c.orig 2009-03-05 18:56:48.000000000 -0600 +++ vmem_sbrk.c 2024-10-11 10:55:35.000000000 -0500 @@ -108,7 +108,7 @@ uintptr_t ret_brk; uintptr_t high_brk; uintptr_t new_brk; - int brk_result; + intptr_t brk_result; #define ALIGNSZ 16 #define BRKALIGN(x) (caddr_t)P2ROUNDUP((uintptr_t)(x), ALIGNSZ) @@ -134,9 +134,9 @@ return ((void *)-1); } - brk_result = brk((void *)new_brk); + brk_result = (intptr_t)brk((void *)new_brk); - if (brk_result != 0) + if (brk_result == (intptr_t)-1) return ((void *)-1); if (actual_size != NULL)