From 165e1e80ff276edbf0162a79cf951d36980a13b9 Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Sat, 3 Sep 2016 07:39:52 -0400 Subject: [PATCH] configure.ac: define _BSD_SOURCE for snprintf() --- configure.ac | 3 +++ uuid.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 7ac3fdc..a48e462 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,9 @@ AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_STDC +AC_DEFINE([_BSD_SOURCE], [], [for snprintf()]) +AC_DEFINE([_DEFAULT_SOURCE], [], [for GNU systems that complain about _BSD_SOURCE being deprecated]) + AC_CONFIG_HEADERS([config.h:config.in]) AC_OUTPUT([Makefile]) diff --git a/uuid.c b/uuid.c index 239db5c..5cf70a8 100644 --- a/uuid.c +++ b/uuid.c @@ -1,3 +1,5 @@ +#include "config.h" + #include #include #include