From: Andre Noll <maan@systemlinux.org>
Date: Fri, 17 May 2013 08:49:10 +0000 (+0200)
Subject: Fix build on FreeBSD
X-Git-Tag: v0.4.13~39^2
X-Git-Url: https://git.tue.mpg.de/?a=commitdiff_plain;h=3ad5b03e1afa554220a516f3941b2ef5348fcc19;p=paraslash.git

Fix build on FreeBSD

Commit 24758c5f (Replace gettimeofday() by clock_gettime()) removed
the inclusion of sys/time.h from several files since this header was
believed to be needed only for gettimeofday(), which was removed in
the same commit.

However, this broke the build on FreeBSD since sys/time.h
also pulled in the declaration of u_short, which is required by
/usr/include/netinet/udp.h. Therefore the compilation of udp_send.c
failed with

	/usr/include/netinet/udp.h:42: error: expected specifier-qualifier-list before 'u_short'

This patch changes udp_send.c to include sys/types.h, which provides
the missing declaration.
---

diff --git a/udp_send.c b/udp_send.c
index b1da3167..7930f092 100644
--- a/udp_send.c
+++ b/udp_send.c
@@ -8,6 +8,7 @@
 
 
 #include <regex.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/udp.h>
 #include <net/if.h>