Defined a macro to replace strerror(3) with calls to thread-safe wrapper
This commit is contained in:
parent
2a59527659
commit
bbbffac3ab
|
@ -254,6 +254,8 @@ const char *safe_strerror(int errnum)
|
|||
return msg;
|
||||
}
|
||||
#else /* HAVE_STRERROR_R */
|
||||
/* we actually wan't to call strerror(3) below */
|
||||
#undef strerror
|
||||
/*
|
||||
* Described in header.
|
||||
*/
|
||||
|
|
|
@ -422,6 +422,11 @@ bool mkdir_p(const char *path, mode_t mode);
|
|||
*/
|
||||
const char *safe_strerror(int errnum);
|
||||
|
||||
/**
|
||||
* Replace usages of strerror(3) with thread-safe variant.
|
||||
*/
|
||||
#define strerror(errnum) safe_strerror(errnum)
|
||||
|
||||
#ifndef HAVE_CLOSEFROM
|
||||
/**
|
||||
* Close open file descriptors greater than or equal to lowfd.
|
||||
|
|
Loading…
Reference in New Issue