mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Make strerror_r portable.
This uses the same code that broker already uses to determine if we use the XSI or gnu version of strerror_r. Patch by Thomas Petersen.
This commit is contained in:
parent
2a873f5aed
commit
fc33bf2014
13 changed files with 63 additions and 18 deletions
|
@ -414,7 +414,7 @@ bool Ascii::DoRotate(const char* rotated_path, double open, double close, bool t
|
|||
if ( rename(fname.c_str(), nname.c_str()) != 0 )
|
||||
{
|
||||
char buf[256];
|
||||
strerror_r(errno, buf, sizeof(buf));
|
||||
bro_strerror_r(errno, buf, sizeof(buf));
|
||||
Error(Fmt("failed to rename %s to %s: %s", fname.c_str(),
|
||||
nname.c_str(), buf));
|
||||
FinishedRotation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue