summaryrefslogtreecommitdiff
path: root/m4/pread.m4
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2010-01-06 14:12:45 -0700
committerEric Blake <ebb9@byu.net>2010-01-06 19:01:19 -0700
commit978114f6f3d4c5d0c1fd7f2bb1f48a37bab89553 (patch)
tree4c4bf8b0a7332317107f4862789377071f128a0f /m4/pread.m4
parent010ecd2dfc078e5a475bc5ab152e7cfc10cef804 (diff)
downloadgnulib-978114f6f3d4c5d0c1fd7f2bb1f48a37bab89553.tar.gz
pread: fix compilation on glibc
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>
Diffstat (limited to 'm4/pread.m4')
-rw-r--r--m4/pread.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/pread.m4 b/m4/pread.m4
index 50d9e4d997..f1425a6b1d 100644
--- a/m4/pread.m4
+++ b/m4/pread.m4
@@ -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