]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/errno.cc
1 #include "common/errno.h"
9 std::string
cpp_strerror(int err
)
16 std::ostringstream oss
;
19 // strerror_r returns char * on Linux, and does not always fill buf
20 #ifdef STRERROR_R_CHAR_P
21 errmsg
= strerror_r(err
, buf
, sizeof(buf
));
23 strerror_r(err
, buf
, sizeof(buf
));
27 oss
<< "(" << err
<< ") " << errmsg
;