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
move msghdr and cmsghdr out of bits/socket.h
[musl.git]
/
src
/
unistd
/
close.c
blob
5b38e0194606cf22e0663df576e73b4249b6a0f9
1
#include <unistd.h>
2
#include <errno.h>
3
#include
"syscall.h"
4
5
static int
dummy
(
int
fd
)
6
{
7
return
fd
;
8
}
9
10
weak_alias
(
dummy
,
__aio_close
);
11
12
int
close
(
int
fd
)
13
{
14
fd
=
__aio_close
(
fd
);
15
int
r
=
__syscall_cp
(
SYS_close
,
fd
);
16
if
(
r
== -
EINTR
)
r
=
0
;
17
return
__syscall_ret
(
r
);
18
}