![leitner](/assets/img/avatar_default.png)
remove unused #include in iob_reset if iob_addfile_close fails, it now closes the fd if iob_addbuf_munmap fails, it now munmaps the buf if iob_addbuf_free fails, it now frees the buf some win32 cross-compile fixes for iarray
12 lines
269 B
C
12 lines
269 B
C
#include <sys/types.h>
|
|
#include "mmap.h"
|
|
#include "iob_internal.h"
|
|
|
|
static void cleanup(struct iob_entry* x) {
|
|
mmap_unmap((char*)x->buf,x->offset+x->n);
|
|
}
|
|
|
|
int iob_addbuf_munmap(io_batch* b,const void* buf,uint64 n) {
|
|
return iob_addbuf_internal(b,buf,n,cleanup);
|
|
}
|