100-musl-compat.patch (1102B)
1 --- a/sysdep.h 2 +++ b/sysdep.h 3 @@ -37,12 +37,14 @@ int tun_read(int fd, unsigned char *buf, 4 int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr); 5 6 /***************************************************************************/ 7 -#if defined(__linux__) || defined(__GLIBC__) 8 +#if defined(__GLIBC__) || defined(__UCLIBC__) 9 #include <error.h> 10 +#define HAVE_ERROR 1 11 +#endif 12 13 +#if defined(__linux__) || defined(__GLIBC__) 14 #define HAVE_VASPRINTF 1 15 #define HAVE_ASPRINTF 1 16 -#define HAVE_ERROR 1 17 #define HAVE_UNSETENV 1 18 #define HAVE_SETENV 1 19 #endif 20 --- a/sysdep.c 21 +++ b/sysdep.c 22 @@ -59,6 +59,10 @@ 23 #if defined(__DragonFly__) 24 #include <net/tun/if_tun.h> 25 #elif defined(__linux__) 26 +# if !defined(__GLIBC__) && !defined(__UCLIBC__) 27 +# define _LINUX_IF_ETHER_H 28 +# include <net/ethernet.h> 29 +# endif 30 #include <linux/if_tun.h> 31 #elif defined(__APPLE__) 32 /* no header for tun */ 33 --- a/config.c 34 +++ b/config.c 35 @@ -28,6 +28,7 @@ 36 #include <unistd.h> 37 #include <string.h> 38 #include <errno.h> 39 +#include <sys/ttydefaults.h> 40 #include <sys/types.h> 41 #include <sys/utsname.h> 42 #include <sys/wait.h>