File:  [DVB] / dietlibc / lib / __fstatfs64.c
Revision 1.2: download - view: text, annotated - select for diffs
Mon Mar 26 03:06:59 2007 UTC (17 years, 2 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  strptime also fills in tm_wday and tm_yday (Gernot Tenchio)
  x86-64 getpriority has bias 20 (Rene Rebe)
  fix typo in fstatfs64 (Gernot Tenchio)
  fix infinite loop in getaddrinfo (Nikola Vladov)
  don't include sys/stat.h in stdio.h and unistd.h (Gernot Tenchio)

#include <errno.h>
#include "dietfeatures.h"
#include <sys/statfs.h>

#if __WORDSIZE == 32

extern int __dietlibc_fstatfs64(int fd, size_t bufsize, struct statfs64 *__buf);
extern void __statfs64_cvt(const struct statfs *src,struct statfs64 *dest);

int fstatfs64(int fd, struct statfs64 *__buf) {
#ifdef WANT_LARGEFILE_BACKCOMPAT
  if (__dietlibc_fstatfs64(fd,sizeof(*__buf),__buf)) {
    struct statfs temp;
    if (errno!=ENOSYS) return -1;
    if (fstatfs(fd,&temp)) return -1;
    __statfs64_cvt(&temp,__buf);
  }
  return 0;
#else
  return __dietlibc_fstatfs64(fd,sizeof(*__buf),__buf);
#endif
}
#endif

LinuxTV legacy CVS <linuxtv.org/cvs>