aboutsummaryrefslogtreecommitdiff
path: root/tests/util/xmalloc.c
diff options
context:
space:
mode:
authorRuss Allbery <rra@dropbox.com>2016-02-03 12:44:33 -0800
committerRuss Allbery <rra@dropbox.com>2016-02-03 12:44:33 -0800
commit2a53df4444cb8a931e82c584288025e315f40121 (patch)
tree7c8b9bfa69cf613a22ba6be616a0d3fdb4146e4e /tests/util/xmalloc.c
parent294d46a917b6aa3af305c3d50b8d83a1f3fb5694 (diff)
parente64d4e31146b87046916c377557f8ea789da3f0a (diff)
Merge branch 'debian/master' into ubuntu/precise
Diffstat (limited to 'tests/util/xmalloc.c')
-rw-r--r--tests/util/xmalloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/util/xmalloc.c b/tests/util/xmalloc.c
index e222612..84ba081 100644
--- a/tests/util/xmalloc.c
+++ b/tests/util/xmalloc.c
@@ -34,7 +34,10 @@
#include <ctype.h>
#include <errno.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
/* Linux requires sys/time.h be included before sys/resource.h. */
#include <sys/resource.h>
@@ -261,7 +264,7 @@ test_asprintf(size_t size)
/* Wrapper around vasprintf to do the va_list stuff. */
-static void
+static void __attribute__((__format__(printf, 2, 3)))
xvasprintf_wrapper(char **strp, const char *format, ...)
{
va_list args;