From e65b3b1505b564d8198bbdbbb1577fa135d7a4c1 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 24 May 2017 19:49:22 +0800 Subject: [PATCH] Move inclusion to fix build on DFlyBSD The ```` header should be included in ``src/netutils.h`` before the usage of ``struct sockaddr_storage``, otherwise build failed with errors such as: ``` In file included from udprelay.c:53:0: netutils.h:68:22: error: 'struct sockaddr_storage' declared inside parameter list [-Werror] int ipv6first); ^ netutils.h:68:22: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] ``` Tested on DragonFly BSD 4.9-development and Debian Linux testing. --- src/netutils.c | 1 - src/netutils.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/netutils.c b/src/netutils.c index f5eb481a..59a8e409 100644 --- a/src/netutils.c +++ b/src/netutils.c @@ -29,7 +29,6 @@ #include "config.h" #endif -#include #include #include #include diff --git a/src/netutils.h b/src/netutils.h index e7dc07dc..6e32e7d0 100644 --- a/src/netutils.h +++ b/src/netutils.h @@ -23,6 +23,8 @@ #ifndef _NETUTILS_H #define _NETUTILS_H +#include + #if defined(__linux__) #include #else