Compare commits

...

2 Commits

Author SHA1 Message Date
Adrien Gallouët
cfd7af9241 Add .build.sh 2016-07-11 11:13:29 +00:00
Adrien Gallouët
c81592fcc5 Don't fd_set_nonblock(-1) 2016-06-23 12:15:01 +00:00
2 changed files with 20 additions and 2 deletions

15
.build.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
export CC="gcc -static"
git clone https://github.com/jedisct1/libsodium --depth=1 --branch stable
cd libsodium || exit 1
./autogen.sh && ./configure --enable-minimal --disable-shared --prefix=/usr && make install
cd ..
./autogen.sh && ./configure && make
[ -x glorytun ] || exit 1
mkdir -p deploy
strip -s glorytun
mv glorytun deploy/glorytun-$(cat VERSION)-$(uname -m).bin

View File

@@ -282,8 +282,11 @@ static int sk_accept (int fd)
int ret = accept(fd, (struct sockaddr *)&addr, &addr_size);
if (ret==-1 && errno!=EINTR)
perror("accept");
if (ret==-1) {
if (errno!=EINTR)
perror("accept");
return -1;
}
fd_set_nonblock(ret);