break; \
char fn[PATH_MAX]; \
snprintf(fn, sizeof(fn), ENCODE_STRINGIFY(ENCODE_DUMP_PATH) "/%s__%d.%x", #cl, getpid(), i++); \
- int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT, 0644); \
+ int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC, 0644); \
if (fd >= 0) { \
bufferlist sub; \
sub.substr_of(bl, pre_off, bl.length() - pre_off); \
#define ENCODE_FINISH(bl) ENCODE_FINISH_NEW_COMPAT(bl, 0)
#define DECODE_ERR_OLDVERSION(func, v, compatv) \
- (std::string(func) + " no longer understand old encoding version " #v " < " #compatv)
+ (std::string(func) + " no longer understand old encoding version " #v " < " + std::to_string(compatv))
#define DECODE_ERR_PAST(func) \
(std::string(func) + " decode past end of struct encoding")