summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block-raw-posix.c3
-rwxr-xr-xconfigure4
-rw-r--r--posix-aio-compat.c4
-rw-r--r--posix-aio-compat.h2
4 files changed, 4 insertions, 9 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index f00ef423a..9e3d66f4c 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -579,8 +579,7 @@ static RawAIOCB *raw_aio_setup(BlockDriverState *bs,
if (!acb)
return NULL;
acb->aiocb.aio_fildes = s->fd;
- acb->aiocb.aio_sigevent.sigev_signo = SIGUSR2;
- acb->aiocb.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
+ acb->aiocb.sigev_signo = SIGUSR2;
acb->aiocb.aio_buf = buf;
if (nb_sectors < 0)
acb->aiocb.aio_nbytes = -nb_sectors;
diff --git a/configure b/configure
index 57e2d57e0..6a1432a17 100755
--- a/configure
+++ b/configure
@@ -1005,9 +1005,7 @@ if test "$aio" = "yes" ; then
aio=no
cat > $TMPC << EOF
#include <pthread.h>
-#include <signal.h>
-int main(void) { struct sigevent s; pthread_mutex_t lock;
- return sigqueue(0, 0, s.sigev_value); }
+int main(void) { pthread_mutex_t lock; return 0; }
EOF
if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then
aio=yes
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index c919e3b22..ef76f74ac 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -94,9 +94,7 @@ static void *aio_thread(void *unused)
idle_threads++;
pthread_mutex_unlock(&lock);
- sigqueue(getpid(),
- aiocb->aio_sigevent.sigev_signo,
- aiocb->aio_sigevent.sigev_value);
+ kill(getpid(), aiocb->sigev_signo);
}
idle_threads--;
diff --git a/posix-aio-compat.h b/posix-aio-compat.h
index 5dddd711a..5eb17043e 100644
--- a/posix-aio-compat.h
+++ b/posix-aio-compat.h
@@ -29,7 +29,7 @@ struct qemu_paiocb
int aio_fildes;
void *aio_buf;
size_t aio_nbytes;
- struct sigevent aio_sigevent;
+ int sigev_signo;
off_t aio_offset;
/* private */