Make error_str GNU_SOURCE compliant
This commit is contained in:
@ -33,8 +33,7 @@ const char *error_str(int err_no, char *buf, int buf_len) {
|
|||||||
int e = err_no & 0x00FFFFFF;
|
int e = err_no & 0x00FFFFFF;
|
||||||
if (mode == 0x00) {
|
if (mode == 0x00) {
|
||||||
// normal
|
// normal
|
||||||
strerror_r(e, buf, buf_len);
|
return strerror_r(e, buf, buf_len);
|
||||||
return buf;
|
|
||||||
} else if (mode == 0x01) {
|
} else if (mode == 0x01) {
|
||||||
// ssl
|
// ssl
|
||||||
return sock_error_str(error_decompress(e));
|
return sock_error_str(error_decompress(e));
|
||||||
|
@ -65,8 +65,7 @@ static void err(const char *restrict msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void logmsgf(log_lvl_t level, const char *restrict format, ...) {
|
void logmsgf(log_lvl_t level, const char *restrict format, ...) {
|
||||||
char buf[256];
|
char buf[256], err_buf[256];
|
||||||
char err_buf[64];
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user