You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

  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. -#if defined(__linux__) || defined(__GLIBC__)
  7. +#if defined(__GLIBC__) || defined(__UCLIBC__)
  8. #include <error.h>
  9. +#define HAVE_ERROR 1
  10. +#endif
  11. +#if defined(__linux__) || defined(__GLIBC__)
  12. #define HAVE_VASPRINTF 1
  13. #define HAVE_ASPRINTF 1
  14. -#define HAVE_ERROR 1
  15. #define HAVE_UNSETENV 1
  16. #define HAVE_SETENV 1
  17. #endif
  18. --- a/sysdep.c
  19. +++ b/sysdep.c
  20. @@ -59,6 +59,10 @@
  21. #if defined(__DragonFly__)
  22. #include <net/tun/if_tun.h>
  23. #elif defined(__linux__)
  24. +# if !defined(__GLIBC__) && !defined(__UCLIBC__)
  25. +# define _LINUX_IF_ETHER_H
  26. +# include <net/ethernet.h>
  27. +# endif
  28. #include <linux/if_tun.h>
  29. #elif defined(__APPLE__)
  30. /* no header for tun */
  31. --- a/config.c
  32. +++ b/config.c
  33. @@ -28,6 +28,7 @@
  34. #include <unistd.h>
  35. #include <string.h>
  36. #include <errno.h>
  37. +#include <sys/ttydefaults.h>
  38. #include <sys/types.h>
  39. #include <sys/utsname.h>
  40. #include <sys/wait.h>