repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
netinet/if_ether.h: add ETH_P_DSA_8021Q from linux v5.2
[musl.git]
/
src
/
malloc
/
posix_memalign.c
blob
2ea8bd8a434a22f555e2ed9482299f0029870c73
1
#include <stdlib.h>
2
#include <errno.h>
3
#include
"malloc_impl.h"
4
5
int
posix_memalign
(
void
**
res
,
size_t
align
,
size_t
len
)
6
{
7
if
(
align
<
sizeof
(
void
*))
return
EINVAL
;
8
void
*
mem
=
__memalign
(
align
,
len
);
9
if
(!
mem
)
return
errno
;
10
*
res
=
mem
;
11
return
0
;
12
}