--- a/sysdep.h +++ b/sysdep.h @@ -37,12 +37,14 @@ int tun_read(int fd, unsigned char *buf, int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr); /***************************************************************************/ -#if defined(__linux__) || defined(__GLIBC__) +#if defined(__GLIBC__) || defined(__UCLIBC__) #include +#define HAVE_ERROR 1 +#endif +#if defined(__linux__) || defined(__GLIBC__) #define HAVE_VASPRINTF 1 #define HAVE_ASPRINTF 1 -#define HAVE_ERROR 1 #define HAVE_UNSETENV 1 #define HAVE_SETENV 1 #endif --- a/sysdep.c +++ b/sysdep.c @@ -59,6 +59,10 @@ #if defined(__DragonFly__) #include #elif defined(__linux__) +# if !defined(__GLIBC__) && !defined(__UCLIBC__) +# define _LINUX_IF_ETHER_H +# include +# endif #include #elif defined(__APPLE__) /* no header for tun */ --- a/config.c +++ b/config.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include