From db08d31f5380899cd21ccc1466e029fb0c43591b Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Dec 2018 21:26:51 +0100 Subject: [PATCH] Fix compiler warning when printing uint64_t --- lib/tcp_rigctl_msg_source_impl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tcp_rigctl_msg_source_impl.cc b/lib/tcp_rigctl_msg_source_impl.cc index e62ca0a..81a5d3f 100644 --- a/lib/tcp_rigctl_msg_source_impl.cc +++ b/lib/tcp_rigctl_msg_source_impl.cc @@ -17,6 +17,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#define __STDC_FORMAT_MACROS +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -86,7 +88,7 @@ namespace gr send_freq (int sock, uint64_t freq) { static char buf[512]; - snprintf (buf, 512, "%llu\n", freq); + snprintf (buf, 512, "%" PRIu64 "\n", freq); send (sock, buf, strnlen (buf, 512), 0); }