Commit | Line | Data |
---|---|---|
1 | #include <stdlib.h> | |
2 | #include <errno.h> | |
3 | #include "compiler/compiler.h" | |
4 | ||
5 | /* | |
6 | * Some Solaris versions don't have posix_memalign(), provide a private | |
7 | * weak alternative | |
8 | */ | |
9 | int __weak posix_memalign(void **ptr, size_t align, size_t size) | |
10 | { | |
11 | *ptr = memalign(align, size); | |
12 | if (*ptr) | |
13 | return 0; | |
14 | ||
15 | return ENOMEM; | |
16 | } |