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);
}