Move <sys/socket.h> inclusion to fix build on DFlyBSD

The ``<sys/socket.h>`` 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.
This commit is contained in:
Aaron LI
2017-05-24 20:00:53 +08:00
committed by Max Lv
parent 2734365a82
commit e65b3b1505
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -29,7 +29,6 @@
#include "config.h"
#endif
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
+2
View File
@@ -23,6 +23,8 @@
#ifndef _NETUTILS_H
#define _NETUTILS_H
#include <sys/socket.h>
#if defined(__linux__)
#include <netdb.h>
#else