mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-24 00:59:19 +02:00
Patch to make it build on BeOS R5-BONE and Haiku from Francois Revol
This commit is contained in:
parent
fb3fa24edb
commit
b619662201
|
@ -14,6 +14,8 @@ CHANGES:
|
||||||
- The interval between "pings" from clients is now 5 seconds.
|
- The interval between "pings" from clients is now 5 seconds.
|
||||||
- Eliminited extra "ping" messages from client to server when server
|
- Eliminited extra "ping" messages from client to server when server
|
||||||
sends data and gets data back directly.
|
sends data and gets data back directly.
|
||||||
|
- Applied patch to make iodine build on BeOS R5-BONE and Haiku,
|
||||||
|
from Francois Revol. Still work to do to get tun device working.
|
||||||
|
|
||||||
2008-08-06: 0.4.2 "Opened Zone"
|
2008-08-06: 0.4.2 "Opened Zone"
|
||||||
- Applied a few small patches from Maxim Bourmistrov and Gregor Herrmann
|
- Applied a few small patches from Maxim Bourmistrov and Gregor Herrmann
|
||||||
|
|
|
@ -9,7 +9,7 @@ OS = `uname | tr "a-z" "A-Z"`
|
||||||
ARCH = `uname -m`
|
ARCH = `uname -m`
|
||||||
|
|
||||||
LDFLAGS = -lz `sh osflags link`
|
LDFLAGS = -lz `sh osflags link`
|
||||||
CFLAGS = -c -g -Wall -D$(OS) -pedantic
|
CFLAGS = -c -g -Wall -D$(OS) -pedantic `sh osflags cflags`
|
||||||
|
|
||||||
all: stateos $(CLIENT) $(SERVER)
|
all: stateos $(CLIENT) $(SERVER)
|
||||||
|
|
||||||
|
|
12
src/common.c
12
src/common.c
|
@ -74,6 +74,14 @@ static int daemon(int nochdir, int noclose)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||||||
|
int setgroups(int count, int *groups)
|
||||||
|
{
|
||||||
|
/* errno = ENOSYS; */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
open_dns(int localport, in_addr_t listen_ip)
|
open_dns(int localport, in_addr_t listen_ip)
|
||||||
{
|
{
|
||||||
|
@ -113,11 +121,15 @@ close_dns(int fd)
|
||||||
void
|
void
|
||||||
do_chroot(char *newroot)
|
do_chroot(char *newroot)
|
||||||
{
|
{
|
||||||
|
#if !defined(__BEOS__) || defined(__HAIKU__)
|
||||||
if (chroot(newroot) != 0 || chdir("/") != 0)
|
if (chroot(newroot) != 0 || chdir("/") != 0)
|
||||||
err(1, "%s", newroot);
|
err(1, "%s", newroot);
|
||||||
|
|
||||||
seteuid(geteuid());
|
seteuid(geteuid());
|
||||||
setuid(getuid());
|
setuid(getuid());
|
||||||
|
#else
|
||||||
|
warnx("chroot not available");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
13
src/osflags
13
src/osflags
|
@ -7,8 +7,21 @@ link)
|
||||||
SunOS | solaris)
|
SunOS | solaris)
|
||||||
echo '-lsocket -lnsl';
|
echo '-lsocket -lnsl';
|
||||||
;;
|
;;
|
||||||
|
BeOS)
|
||||||
|
echo '-lsocket -lbind -lbsd';
|
||||||
|
;;
|
||||||
|
Haiku)
|
||||||
|
echo '-lnetwork';
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cflags)
|
||||||
|
case `uname` in
|
||||||
|
BeOS)
|
||||||
|
echo '-Dsocklen_t=int';
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue