Fix build on FreeBSD
authorAndre Noll <maan@systemlinux.org>
Fri, 17 May 2013 08:49:10 +0000 (10:49 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 17 May 2013 08:49:10 +0000 (10:49 +0200)
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.

udp_send.c

index b1da3167880c63895fd7d2d0f94a01feed620a1f..7930f09234486d3448b196ba45ae3b178845d001 100644 (file)
@@ -8,6 +8,7 @@
 
 
 #include <regex.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/udp.h>
 #include <net/if.h>