#22 harness: use off64_t instead of off_t in test 23.t (EINVAL on 32-bit)
Merged 3 months ago by jmoyer. Opened 2 years ago by andreasbaumann.
andreasbaumann/libaio test32-off_t  into  master

file modified
+2 -2
@@ -72,7 +72,7 @@ 

  static void *thrproc2(void *arg)

  {

  	for (;;) {

- 		off_t offset = 0;

+ 		off64_t offset = 0;

  

  		pthread_barrier_wait(&barrier);

  		if (exiting)
@@ -92,7 +92,7 @@ 

  {

  	for (;;) {

  		char c;

- 		off_t offset = 0;

+ 		off64_t offset = 0;

  

  		pthread_barrier_wait(&barrier);

  		if (exiting)

Running cases/23.p on Archlinux32 yields:
splice() -> Invalid argument (EINVAL)

The signature of the splice function is:

   ssize_t splice(int fd_in, off64_t *off_in, int fd_out,
                  off64_t *off_out, size_t len, unsigned int flags);

Replacing off_t with off64_t works on 64-bit and 32-bit Intel..

Pull-Request has been merged by jmoyer

3 months ago
Metadata