]> mj.ucw.cz Git - pciutils.git/commitdiff
glibc 2.1.x defines pread()/pwrite() in its include files, no need
authorMartin Mares <mj@ucw.cz>
Mon, 19 Oct 1998 13:37:44 +0000 (13:37 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:09:56 +0000 (14:09 +0200)
to do it yourself.

setpci.c

index 263b7587337d9b9342f53d2e2ade1f0de047b44d..310aee60d04ddf66f91050e510c04fb70ad6aa03 100644 (file)
--- 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)
 {