pread: fix compilation on glibc
authorEric Blake <ebb9@byu.net>
Wed, 6 Jan 2010 21:12:45 +0000 (14:12 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 7 Jan 2010 02:01:19 +0000 (19:01 -0700)
pread was not mandatory until POSIX 2008, so glibc does not
expose it by default.

* m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
m4/pread.m4

index 7b9dc990fc7a2b74ccf7353a6d203f2254972a54..3e3f70bf13ef42d801b5358bf3b29ec8419c63c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-01-06  Eric Blake  <ebb9@byu.net>
 
+       pread: fix compilation on glibc
+       * m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
+       Reported by Ralf Wildenhues.
+
        dirent: fix test failure
        * lib/dirent.in.h (includes): Guarantee ino_t.
        Reported by Ralf Wildenhues.
index 50d9e4d9975cdaa5c0fdb895203b5871a21ca335..f1425a6b1de25b30e9c2f598f0a041da416714a8 100644 (file)
@@ -1,4 +1,4 @@
-# pread.m4 serial 1
+# pread.m4 serial 2
 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,9 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_PREAD],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl Persuade glibc <unistd.h> to declare pread().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
   AC_CHECK_FUNCS_ONCE([pread])
   if test $ac_cv_func_pread = no; then
     HAVE_PREAD=0