about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-07-12 11:37:08 +0200
committerAndreas Schwab <schwab@redhat.com>2010-07-12 11:52:23 +0200
commit23de301fe848f644cb7fab16a4ef8f167156cca8 (patch)
treeeed41a07ae7ac99cf5477c840249b9f262b93b43 /sysdeps/unix/sysv
parenta06f3a382318e4cbc1bec49b923ef1b4f1e2a493 (diff)
parentb08c89d9f36dea19634f6e59cc839f920b827116 (diff)
downloadglibc-23de301fe848f644cb7fab16a4ef8f167156cca8.tar.gz
glibc-23de301fe848f644cb7fab16a4ef8f167156cca8.tar.xz
glibc-23de301fe848f644cb7fab16a4ef8f167156cca8.zip
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/fpathconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/fpathconf.c b/sysdeps/unix/sysv/linux/fpathconf.c
index 2701c9ec99..617a5a93cf 100644
--- a/sysdeps/unix/sysv/linux/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/fpathconf.c
@@ -1,5 +1,6 @@
 /* Get file-specific information about descriptor FD.  Linux version.
-   Copyright (C) 1991,1995,1996,1998-2003,2008 Free Software Foundation, Inc.
+   Copyright (C) 1991,1995,1996,1998-2003,2008,2010
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +18,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <fcntl.h>
 #include "pathconf.h"
 
 static long int posix_fpathconf (int fd, int name);
@@ -33,6 +35,7 @@ __fpathconf (fd, name)
      int name;
 {
   struct statfs fsbuf;
+  int r;
 
   switch (name)
     {
@@ -48,6 +51,12 @@ __fpathconf (fd, name)
     case _PC_CHOWN_RESTRICTED:
       return __statfs_chown_restricted (__fstatfs (fd, &fsbuf), &fsbuf);
 
+    case _PC_PIPE_BUF:
+      r = __fcntl (fd, F_GETPIPE_SZ);
+      if (r > 0)
+	return r;
+      /* FALLTHROUGH */
+
     default:
       return posix_fpathconf (fd, name);
     }