more BSD compat

master
leitner 22 years ago
parent 08b68f1bdc
commit 824630a489

@ -2,9 +2,9 @@
#include "io_internal.h"
void io_close(int64 d) {
io_entry* e;
close(d);
io_entry* e=array_get(&io_fds,sizeof(io_entry),d);
if (e) {
if ((e=array_get(&io_fds,sizeof(io_entry),d))) {
e->inuse=0;
io_dontwantread(d);
io_dontwantwrite(d);

@ -6,6 +6,10 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/select.h>
/* braindead BSD uses bzero in FD_ZERO but doesn't #include string.h */
#include <string.h>
extern int select();
#endif

@ -12,13 +12,13 @@ int socket_bind6(int s,const char ip[16],uint16 port,uint32 scope_id)
#ifdef LIBC_HAS_IP6
struct sockaddr_in6 sa;
#endif
int i;
if (!ip) ip=V6any;
#ifdef LIBC_HAS_IP6
if (noipv6) {
#endif
int i;
for (i=0; i<16; i++)
if (ip[i]!=0) break;
if (i==16 || ip6_isv4mapped(ip))

Loading…
Cancel
Save