From: Martin Mares Date: Mon, 19 Oct 1998 13:37:44 +0000 (+0000) Subject: glibc 2.1.x defines pread()/pwrite() in its include files, no need X-Git-Tag: v3.0.0~315 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=19c6374be3a6f5cf25b30b52fc1b432d60c0117b;p=pciutils.git glibc 2.1.x defines pread()/pwrite() in its include files, no need to do it yourself. --- diff --git a/setpci.c b/setpci.c index 263b758..310aee6 100644 --- a/setpci.c +++ b/setpci.c @@ -1,5 +1,5 @@ /* - * $Id: setpci.c,v 1.5 1998/09/02 18:47:42 mj Exp $ + * $Id: setpci.c,v 1.6 1998/10/19 13:37:44 mj Exp $ * * Linux PCI Utilities -- Manipulate PCI Configuration Registers * @@ -65,6 +65,8 @@ xmalloc(unsigned int howmuch) * As libc doesn't support pread/pwrite yet, we have to call them directly * or use lseek/read/write instead. */ +#if !(defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0) + #if defined(__GLIBC__) && !(defined(__powerpc__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0) #ifndef SYS_pread #define SYS_pread __NR_pread @@ -88,6 +90,8 @@ static _syscall4(int, pread, unsigned int, fd, void *, buf, size_t, size, loff_t static _syscall4(int, pwrite, unsigned int, fd, void *, buf, size_t, size, loff_t, where); #endif +#endif + static void scan_devices(void) {