summaryrefslogtreecommitdiff
path: root/include/unistd.h
diff options
context:
space:
mode:
authorjvoisin2025-12-30 11:32:19 +0100
committerJulien Voisin2025-12-30 11:34:48 +0100
commitc4c5fd41124f38a5afee02b8f604ddc21d3b199a (patch)
tree77e2be706743d954bfcaa28163751fcd2f4cd27e /include/unistd.h
parent4797899b24d35873211cf0cd1a2a373e2db3c528 (diff)
Change __access into __fortify_access to fix potential conflicts
Diffstat (limited to 'include/unistd.h')
-rw-r--r--include/unistd.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/unistd.h b/include/unistd.h
index a6c2ed1..a2b3105 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -41,7 +41,7 @@ extern "C" {
41#undef ttyname_r 41#undef ttyname_r
42#undef write 42#undef write
43 43
44__access(write_only, 2, 3) 44__fortify_access(write_only, 2, 3)
45_FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l) 45_FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l)
46{ 46{
47 size_t __b = __bos(__s, 0); 47 size_t __b = __bos(__s, 0);
@@ -52,7 +52,7 @@ _FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __
52 return __r; 52 return __r;
53} 53}
54 54
55__access(write_only, 1, 2) 55__fortify_access(write_only, 1, 2)
56_FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l) 56_FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l)
57{ 57{
58 size_t __b = __bos(__s, 0); 58 size_t __b = __bos(__s, 0);
@@ -64,7 +64,7 @@ _FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l)
64 64
65#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 65#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
66#undef getdomainname 66#undef getdomainname
67__access(write_only, 1, 2) 67__fortify_access(write_only, 1, 2)
68_FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __l) 68_FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __l)
69{ 69{
70 size_t __b = __bos(__s, 0); 70 size_t __b = __bos(__s, 0);
@@ -84,7 +84,7 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t * _FORTIFY_POS0 __s)
84 return __orig_getgroups(__l, __s); 84 return __orig_getgroups(__l, __s);
85} 85}
86 86
87__access(write_only, 1, 2) 87__fortify_access(write_only, 1, 2)
88_FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l) 88_FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l)
89{ 89{
90 size_t __b = __bos(__s, 0); 90 size_t __b = __bos(__s, 0);
@@ -94,7 +94,7 @@ _FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l)
94 return __orig_gethostname(__s, __l); 94 return __orig_gethostname(__s, __l);
95} 95}
96 96
97__access(write_only, 1, 2) 97__fortify_access(write_only, 1, 2)
98_FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l) 98_FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l)
99{ 99{
100 size_t __b = __bos(__s, 0); 100 size_t __b = __bos(__s, 0);
@@ -114,7 +114,7 @@ _FORTIFY_FN(pread) ssize_t pread(int __f, void * _FORTIFY_POS0 __s,
114 return __orig_pread(__f, __s, __n, __o); 114 return __orig_pread(__f, __s, __n, __o);
115} 115}
116 116
117__access(write_only, 2, 3) 117__fortify_access(write_only, 2, 3)
118_FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n) 118_FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n)
119{ 119{
120 size_t __b = __bos(__s, 0); 120 size_t __b = __bos(__s, 0);
@@ -124,7 +124,7 @@ _FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n)
124 return __orig_read(__f, __s, __n); 124 return __orig_read(__f, __s, __n);
125} 125}
126 126
127__access(write_only, 2, 3) 127__fortify_access(write_only, 2, 3)
128_FORTIFY_FN(readlink) ssize_t readlink(const char *__p, 128_FORTIFY_FN(readlink) ssize_t readlink(const char *__p,
129 char * _FORTIFY_POS0 __s, size_t __n) 129 char * _FORTIFY_POS0 __s, size_t __n)
130{ 130{
@@ -135,7 +135,7 @@ _FORTIFY_FN(readlink) ssize_t readlink(const char *__p,
135 return __orig_readlink(__p, __s, __n); 135 return __orig_readlink(__p, __s, __n);
136} 136}
137 137
138__access(write_only, 3, 4) 138__fortify_access(write_only, 3, 4)
139_FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p, 139_FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p,
140 char * _FORTIFY_POS0 __s, size_t __n) 140 char * _FORTIFY_POS0 __s, size_t __n)
141{ 141{
@@ -146,7 +146,7 @@ _FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p,
146 return __orig_readlinkat(__f, __p, __s, __n); 146 return __orig_readlinkat(__f, __p, __s, __n);
147} 147}
148 148
149__access(write_only, 2, 3) 149__fortify_access(write_only, 2, 3)
150_FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s, 150_FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s,
151 size_t __n) 151 size_t __n)
152{ 152{
@@ -157,7 +157,7 @@ _FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s,
157 return __orig_ttyname_r(__f, __s, __n); 157 return __orig_ttyname_r(__f, __s, __n);
158} 158}
159 159
160__access(read_only, 2, 3) 160__fortify_access(read_only, 2, 3)
161_FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s, 161_FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s,
162 size_t __n) 162 size_t __n)
163{ 163{