Commit d95c583
authored
apps: ojph_sockets: Detect __GLIBC__ before using GNU-flavour strerror_r (#229)
According to manpage, glibc is the only libc implementation whose strerror_r() may return a char * pointer instead of int. Let's guard usage of the GNU-flavour prototype, instead of the standard XSI one.
This should fix compilation on musl, *BSD, ..., etc.
Signed-off-by: Yao Zi <[email protected]>1 parent b7d12b0 commit d95c583
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
177 | | - | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
0 commit comments