From: Changcheng Liu Date: Sat, 13 Apr 2019 06:06:52 +0000 (+0800) Subject: denc: fix build error by calling global snprintf X-Git-Tag: v15.1.0~2884^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5018973e368b53f7dc4425b4d68360dce5f90b5;p=ceph-ci.git denc: fix build error by calling global snprintf 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 --- diff --git a/src/include/denc.h b/src/include/denc.h index c9a86cfb0d9..7d4839224a5 100644 --- a/src/include/denc.h +++ b/src/include/denc.h @@ -94,7 +94,7 @@ inline constexpr bool denc_supported = denc_traits::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); \