picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 8b30ca21bdc2dc03a72d5aab567b1f069077e918
parent 85d2f2d6d513e28062fe48013893fa67d156c97e
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed,  6 Feb 2013 10:52:16 +0100

Socket F_SETFL after accept() only for non-Linux
Diffstat:
Msrc/net.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/net.c b/src/net.c @@ -1,4 +1,4 @@ -/* 04feb13abu +/* 06feb13abu * (c) Software Lab. Alexander Burger */ @@ -74,7 +74,9 @@ static any tcpAccept(int sd) { socklen_t len = sizeof(addr); if ((sd2 = accept(sd, (struct sockaddr*)&addr, &len)) >= 0) { fcntl(sd, F_SETFL, f); +#ifndef __linux__ fcntl(sd2, F_SETFL, 0); +#endif inet_ntop(AF_INET6, &addr.sin6_addr, s, INET6_ADDRSTRLEN); val(Adr) = mkStr(s); initInFile(sd2,NULL), initOutFile(sd2);