b9b9e8b29e
svn path=/nixpkgs/trunk/; revision=1209
93 lines
2.3 KiB
Diff
93 lines
2.3 KiB
Diff
diff -rc linux-orig/arch/um/os-Linux/aio.c linux-2.4.24/arch/um/os-Linux/aio.c
|
|
*** linux-orig/arch/um/os-Linux/aio.c 2004-07-29 23:32:53.000000000 +0200
|
|
--- linux-2.4.24/arch/um/os-Linux/aio.c 2004-07-30 12:39:46.000000000 +0200
|
|
***************
|
|
*** 9,15 ****
|
|
--- 9,17 ----
|
|
#include <errno.h>
|
|
#include <sched.h>
|
|
#include <sys/syscall.h>
|
|
+ #if defined(HAVE_AIO_ABI)
|
|
#include <linux/aio_abi.h>
|
|
+ #endif
|
|
#include "os.h"
|
|
#include "helper.h"
|
|
#include "aio.h"
|
|
***************
|
|
*** 245,250 ****
|
|
--- 247,253 ----
|
|
return(0);
|
|
}
|
|
|
|
+ #if defined(HAVE_AIO_ABI)
|
|
static int init_aio_26(void)
|
|
{
|
|
unsigned long stack;
|
|
***************
|
|
*** 282,287 ****
|
|
--- 285,297 ----
|
|
return(init_aio_24());
|
|
else return(init_aio_26());
|
|
}
|
|
+ #else
|
|
+ static int init_aio(void)
|
|
+ {
|
|
+ printk("Compiled without 2.6 AIO support\n");
|
|
+ return(init_aio_24());
|
|
+ }
|
|
+ #endif
|
|
|
|
__initcall(init_aio);
|
|
|
|
***************
|
|
*** 313,318 ****
|
|
--- 323,329 ----
|
|
return(err);
|
|
}
|
|
|
|
+ #if defined(HAVE_AIO_ABI)
|
|
int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
|
|
unsigned long long offset, int reply_fd, void *data)
|
|
{
|
|
***************
|
|
*** 345,350 ****
|
|
--- 356,368 ----
|
|
data));
|
|
}
|
|
}
|
|
+ #else
|
|
+ int submit_aio(enum aio_type type, int io_fd, char *buf, int len,
|
|
+ unsigned long long offset, int reply_fd, void *data)
|
|
+ {
|
|
+ return(submit_aio_24(type, io_fd, buf, len, offset, reply_fd, data));
|
|
+ }
|
|
+ #endif
|
|
|
|
/*
|
|
* Overrides for Emacs so that we follow Linus's tabbing style.
|
|
Only in linux-2.4.24/arch/um/os-Linux: aio.c~
|
|
diff -rc linux-orig/arch/um/os-Linux/Makefile linux-2.4.24/arch/um/os-Linux/Makefile
|
|
*** linux-orig/arch/um/os-Linux/Makefile 2004-07-29 23:32:53.000000000 +0200
|
|
--- linux-2.4.24/arch/um/os-Linux/Makefile 2004-07-29 23:33:15.000000000 +0200
|
|
***************
|
|
*** 7,16 ****
|
|
|
|
obj-y = aio.o file.o process.o time.o tty.o
|
|
|
|
! HAVE_AIO_ABI = $(shell [ -e /usr/include/linux/aio_abi.h ] && \
|
|
! echo -DHAVE_AIO_ABI)
|
|
! HAVE_AIO_LIBC = $(shell objdump -T /lib/libc-*.so | grep io_submit && \
|
|
! echo -DHAVE_AIO_LIBC)
|
|
CFLAGS_aio.o = $(HAVE_AIO_ABI) $(HAVE_AIO_LIBC)
|
|
|
|
include $(TOPDIR)/Rules.make
|
|
--- 7,14 ----
|
|
|
|
obj-y = aio.o file.o process.o time.o tty.o
|
|
|
|
! HAVE_AIO_ABI =
|
|
! HAVE_AIO_LIBC =
|
|
CFLAGS_aio.o = $(HAVE_AIO_ABI) $(HAVE_AIO_LIBC)
|
|
|
|
include $(TOPDIR)/Rules.make
|