mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
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;
|
return msg;
|
||||||
}
|
}
|
||||||
#else /* HAVE_STRERROR_R */
|
#else /* HAVE_STRERROR_R */
|
||||||
|
/* we actually wan't to call strerror(3) below */
|
||||||
|
#undef strerror
|
||||||
/*
|
/*
|
||||||
* Described in header.
|
* Described in header.
|
||||||
*/
|
*/
|
||||||
|
@ -422,6 +422,11 @@ bool mkdir_p(const char *path, mode_t mode);
|
|||||||
*/
|
*/
|
||||||
const char *safe_strerror(int errnum);
|
const char *safe_strerror(int errnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace usages of strerror(3) with thread-safe variant.
|
||||||
|
*/
|
||||||
|
#define strerror(errnum) safe_strerror(errnum)
|
||||||
|
|
||||||
#ifndef HAVE_CLOSEFROM
|
#ifndef HAVE_CLOSEFROM
|
||||||
/**
|
/**
|
||||||
* Close open file descriptors greater than or equal to lowfd.
|
* Close open file descriptors greater than or equal to lowfd.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user