#include "common/errno.h"
#include "acconfig.h"
+#include "include/compat.h"
#include <sstream>
#include <string.h>
if (err < 0)
err = -err;
std::ostringstream oss;
- buf[0] = '\0';
- // strerror_r returns char * on Linux, and does not always fill buf
-#ifdef STRERROR_R_CHAR_P
- errmsg = strerror_r(err, buf, sizeof(buf));
-#else
- strerror_r(err, buf, sizeof(buf));
- errmsg = buf;
-#endif
+ errmsg = ceph_strerror_r(err, buf, sizeof(buf));
oss << "(" << err << ") " << errmsg;