Skip to content

Commit

Permalink
cc_mm use OS_DARWIN macro to detect OS (twitter#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbiesek authored and Yao Yue committed Jun 27, 2019
1 parent 57acaf6 commit 2e6f78a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cc_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
#include <string.h>
#include <sys/mman.h>

/* TODO(yao): detect OS in one place and use one variable everywhere */
#if defined(__APPLE__) && defined(__MACH__)
#ifdef OS_DARWIN
# define MAP_ANONYMOUS MAP_ANON
#include <malloc/malloc.h>
#define malloc_usable_size malloc_size
Expand Down

0 comments on commit 2e6f78a

Please sign in to comment.