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