$NetBSD: patch-ad,v 1.7 2016/04/15 08:47:50 wiz Exp $

--- include/global.h.orig	2015-11-09 07:39:18.000000000 +0000
+++ include/global.h
@@ -30,6 +30,13 @@
 
 /* for timeval and timespec */
 #include <time.h>
+#if defined(__FreeBSD__)
+#include <sys/timespec.h>
+#endif
+
+#ifdef __sun
+#include <alloca.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
