]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/include/encoding.h
update sources to 12.2.10
[ceph.git] / ceph / src / include / encoding.h
index 5dd62adce297afd56ebba768afcc650a907f54a9..4dd5be629bf5c24c6f13c1c0a771cc9bc0fde924 100644 (file)
@@ -139,7 +139,7 @@ WRITE_INTTYPE_ENCODER(int16_t, le16)
       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);               \
@@ -1058,7 +1058,7 @@ decode(std::array<T, N>& v, bufferlist::iterator& p)
 #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")