diff options
author | deraadt <> | 2018-03-06 14:28:01 +0000 |
---|---|---|
committer | deraadt <> | 2018-03-06 14:28:01 +0000 |
commit | 8499f4be87aaffec67d6c3aaf62d18a847e4a6ff (patch) | |
tree | 567025aee42397ce8595f78b31d67ee85633a63a | |
parent | f60664101c06d715133b8cc056cc40f403aeab71 (diff) | |
download | openbsd-8499f4be87aaffec67d6c3aaf62d18a847e4a6ff.tar.gz openbsd-8499f4be87aaffec67d6c3aaf62d18a847e4a6ff.tar.bz2 openbsd-8499f4be87aaffec67d6c3aaf62d18a847e4a6ff.zip |
use _ALIGN() which is uhm a bit OpenBSD-specific, but it means we
don't need to use sys/param.h at all, guess which one i believe is
greater namespace polution
ok otto
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 9843cab838..90c49aa538 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc.c,v 1.246 2018/03/05 01:32:32 deraadt Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.247 2018/03/06 14:28:01 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> | 3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> |
4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> | 4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> |
@@ -26,7 +26,6 @@ | |||
26 | /* #define MALLOC_STATS */ | 26 | /* #define MALLOC_STATS */ |
27 | 27 | ||
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include <sys/param.h> /* PAGE_SHIFT ALIGN */ | ||
30 | #include <sys/queue.h> | 29 | #include <sys/queue.h> |
31 | #include <sys/mman.h> | 30 | #include <sys/mman.h> |
32 | #include <sys/uio.h> | 31 | #include <sys/uio.h> |
@@ -833,7 +832,7 @@ alloc_chunk_info(struct dir_info *d, int bits) | |||
833 | size = sizeof(struct chunk_info) + (size - 1) * sizeof(u_short); | 832 | size = sizeof(struct chunk_info) + (size - 1) * sizeof(u_short); |
834 | if (mopts.chunk_canaries) | 833 | if (mopts.chunk_canaries) |
835 | size += count * sizeof(u_short); | 834 | size += count * sizeof(u_short); |
836 | size = ALIGN(size); | 835 | size = _ALIGN(size); |
837 | 836 | ||
838 | q = MMAP(MALLOC_PAGESIZE); | 837 | q = MMAP(MALLOC_PAGESIZE); |
839 | if (q == MAP_FAILED) | 838 | if (q == MAP_FAILED) |