]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
denc: fix build error by calling global snprintf 27572/head
authorChangcheng Liu <changcheng.liu@intel.com>
Sat, 13 Apr 2019 06:06:52 +0000 (14:06 +0800)
committerChangcheng Liu <changcheng.liu@intel.com>
Sat, 13 Apr 2019 06:06:52 +0000 (14:06 +0800)
The snprintf in local namespace only need 3 parameters which
doesn't match the call function protertype here.
Fix the build error by calling global snprintf.

Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
src/include/denc.h

index c9a86cfb0d9d1031b8abb95d691f77d2660d8c29..7d4839224a5579b772a14f88d57cf6dee2315756 100644 (file)
@@ -94,7 +94,7 @@ inline constexpr bool denc_supported = denc_traits<T>::supported;
     if (bits > 2)                                                      \
       break;                                                           \
     char fn[PATH_MAX];                                                 \
-    snprintf(fn, sizeof(fn),                                           \
+    ::snprintf(fn, sizeof(fn),                                         \
             ENCODE_STRINGIFY(ENCODE_DUMP_PATH) "/%s__%d.%x", #Type,            \
             getpid(), i++);                                            \
     int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC, 0644);             \