yarrick / iodine

Official git repo for iodine dns tunnel
https://code.kryo.se/iodine
ISC License
6.26k stars 508 forks source link

Fix compiling error on Alpine #34

Closed ghost closed 5 years ago

ghost commented 5 years ago

common.c:61:12: error: static declaration of 'daemon' follows non-static declaration static int daemon(int nochdir, int noclose) ^~ In file included from /usr/include/fortify/unistd.h:22, from common.c:26: /usr/include/unistd.h:170:5: note: previous declaration of 'daemon' was here int daemon(int, int); ^~ make[1]: [Makefile:33: common.o] Error 1 make[1]: Leaving directory '/iodine/src' make: [Makefile:20: all] Error 2

The unistd.h on Alpine Linux seems different from other distros.

yarrick commented 5 years ago

There is a package for alpine already: https://pkgs.alpinelinux.org/packages?name=iodine&branch=edge

doing a small hack to make it build

ghost commented 5 years ago
CFLAGS="$CFLAGS -D__GLIBC__=1" make

Thanks, learned a lot.