1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# HG changeset patch
# User Bitbucket <noreply@bitbucket.org>
# Date 0 0
# Node ID af5523fe25247f537884116bd37e8ce171ba837e
# Parent ce1acb28953fd6928ccb8f9511e374eab66e8625
# Parent 22cf2727f838e9f5efaeba377341c3807d74dbdb
Merge preview of source (22cf2727f838e9f5efaeba377341c3807d74dbdb) to destination (ce1acb28953fd6928ccb8f9511e374eab66e8625).
diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r af5523fe25247f537884116bd37e8ce171ba837e coregrind/m_syswrap/syswrap-freebsd.c
--- a/coregrind/m_syswrap/syswrap-freebsd.c
+++ b/coregrind/m_syswrap/syswrap-freebsd.c
@@ -480,6 +480,23 @@
SET_STATUS_from_SysRes(r);
}
+PRE(sys_accept4)
+{
+ *flags |= SfMayBlock;
+ PRINT("sys_accept4 ( %ld, %#lx, %ld, %ld)",ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(long, "accept4",
+ int, s, struct sockaddr *, addr, int, *addrlen, int, flags);
+ ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
+}
+POST(sys_accept4)
+{
+ SysRes r;
+ vg_assert(SUCCESS);
+ r = ML_(generic_POST_sys_accept)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3);
+ SET_STATUS_from_SysRes(r);
+}
+
PRE(sys_sendto)
{
*flags |= SfMayBlock;
@@ -4307,7 +4324,8 @@
BSDXY(__NR___semctl, sys___semctl), // 510
BSDXY(__NR_shmctl, sys_shmctl), // 512
-
+
+ BSDXY(__NR_accept4, sys_accept4), //541
BSDXY(__NR_pipe2, sys_pipe2), // 542
BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn
diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r af5523fe25247f537884116bd37e8ce171ba837e include/vki/vki-scnums-freebsd.h
--- a/include/vki/vki-scnums-freebsd.h
+++ b/include/vki/vki-scnums-freebsd.h
@@ -407,6 +407,7 @@
#define __NR_posix_openpt 504
#define __NR___semctl 510
#define __NR_shmctl 512
+#define __NR_accept4 541
#define __NR_pipe2 542
#define __NR_fake_sigreturn 1000
|