summaryrefslogtreecommitdiff
path: root/include/sys/socket.h
diff options
context:
space:
mode:
authorDaniel Kolesa2022-10-26 00:30:00 +0200
committerjvoisin2023-06-25 18:26:45 +0200
commitfe149628eaae9748be08815d726cc56e8e492c73 (patch)
tree252ed41ea13504b67b3c03e648113015b8f85dda /include/sys/socket.h
parentadae76af26e498af6c3004a52a4b1de2c6fd91c3 (diff)
add initial clang support
Diffstat (limited to 'include/sys/socket.h')
-rw-r--r--include/sys/socket.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 604d65a..7dfa71a 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org> 2 * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org>
3 * Copyright (C) 2022 q66 <q66@chimera-linux.org>
3 * 4 *
4 * Permission to use, copy, modify, and/or distribute this software for any 5 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted. 6 * purpose with or without fee is hereby granted.
@@ -33,7 +34,8 @@ extern "C" {
33#undef send 34#undef send
34#undef sendto 35#undef sendto
35 36
36_FORTIFY_FN(recv) ssize_t recv(int __f, void *__s, size_t __n, int __fl) 37_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
38 int __fl)
37{ 39{
38 size_t __b = __bos(__s, 0); 40 size_t __b = __bos(__s, 0);
39 41
@@ -42,7 +44,8 @@ _FORTIFY_FN(recv) ssize_t recv(int __f, void *__s, size_t __n, int __fl)
42 return __orig_recv(__f, __s, __n, __fl); 44 return __orig_recv(__f, __s, __n, __fl);
43} 45}
44 46
45_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void *__s, size_t __n, int __fl, 47_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s,
48 size_t __n, int __fl,
46 struct sockaddr *__a, socklen_t *__l) 49 struct sockaddr *__a, socklen_t *__l)
47{ 50{
48 size_t __b = __bos(__s, 0); 51 size_t __b = __bos(__s, 0);
@@ -52,7 +55,8 @@ _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void *__s, size_t __n, int __fl,
52 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l); 55 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l);
53} 56}
54 57
55_FORTIFY_FN(send) ssize_t send(int __f, const void *__s, size_t __n, int __fl) 58_FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s,
59 size_t __n, int __fl)
56{ 60{
57 size_t __b = __bos(__s, 0); 61 size_t __b = __bos(__s, 0);
58 62
@@ -61,7 +65,8 @@ _FORTIFY_FN(send) ssize_t send(int __f, const void *__s, size_t __n, int __fl)
61 return __orig_send(__f, __s, __n, __fl); 65 return __orig_send(__f, __s, __n, __fl);
62} 66}
63 67
64_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void *__s, size_t __n, int __fl, 68_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s,
69 size_t __n, int __fl,
65 const struct sockaddr *__a, socklen_t __l) 70 const struct sockaddr *__a, socklen_t __l)
66{ 71{
67 size_t __b = __bos(__s, 0); 72 size_t __b = __bos(__s, 0);