diff --git a/io/iob_send.c b/io/iob_send.c index 66b10eb..89fac40 100644 --- a/io/iob_send.c +++ b/io/iob_send.c @@ -5,10 +5,7 @@ #include #include #include -#if defined(__linux__) -#include -#endif - +#include "havealloca.h" #include "iob_internal.h" #include "havebsdsf.h" @@ -23,7 +20,7 @@ int64 iob_send(int64 s,io_batch* b) { #endif if (b->bytesleft==0) return 0; - last=array_start(&b->b)+array_bytes(&b->b); + last=(iob_entry*)(((char*)array_start(&b->b))+array_bytes(&b->b)); v=alloca(b->bufs*sizeof(struct iovec)); total=0; for (;;) {