#17 Fix 32b vectored aio
Opened 2 years ago by bholman. Modified a year ago
https://github.com/holmanb/libaio.git master  into  master

Fix 32b vectored aio
Brett Holman • 2 years ago  
src/libaio.h
file modified
+2 -2
@@ -116,8 +116,8 @@

  };	/* result code is the amount read or -'ve errno */

  

  struct io_iocb_vector {

- 	const struct iovec	*vec;

- 	int			nr;

+ 	PADDEDptr(const struct iovec *vec, __pad1);

+ 	PADDED(int nr, __pad2);

  	long long		offset;

  };	/* result code is the amount read or -'ve errno */

  

no initial comment

See the comparison of the linux kernel and libaio struct iocb definitions below.

from linux/aio_abi.h

struct iocb {
<snip>

    __u64   aio_buf;
    __u64   aio_nbytes;
    __s64   aio_offset;
<snip>
}

from libaio.h

struct io_iocb_vector {
    const struct iovec  *vec;
    int         nr;
    long long       offset;
};

struct iocb {
<snip>
    union {
        struct io_iocb_common       c;
        struct io_iocb_vector       v;
        struct io_iocb_poll     poll;
        struct io_iocb_sockaddr saddr;
    } u;

The above definitions are not compatible on 32b systems.

This was fixed in commit a1bef69, so it can be closed now.

Metadata