NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git] / lib / pread.c
index 632b914..91fa344 100644 (file)
@@ -1,5 +1,5 @@
 /* replacement pread function
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 
 #define __libc_lseek(f,o,w) lseek (f, o, w)
 #define __set_errno(Val) errno = (Val)
+#define __libc_read(f,b,n) read (f, b, n)
 
 /* pread substitute for systems that the function, such as mingw32 and BeOS.  */
 /* The following is identical to the function from glibc's
@@ -55,7 +56,7 @@ pread (int fd, void *buf, size_t nbyte, off_t offset)
   if (__libc_lseek (fd, old_offset, SEEK_SET) == (off_t) -1)
     {
       if (result == -1)
-       __set_errno (save_errno);
+        __set_errno (save_errno);
       return -1;
     }
   __set_errno (save_errno);