Hi,
The struct looks like this:
struct statfs {
short f_type; /* type of filesystem (see
below) */
short f_flags; /* copy of mount flags */
int f_fsize; /* fundamental filesystem
block size */
int f_bsize; /* optimal transfer block
size */
int f_blocks; /* total data blocks in file
system, */
/* note: may not represent
fs size. */
int f_bfree; /* free blocks in fs */
int f_bavail; /* free blocks avail to non-
su */
int f_files; /* total file nodes in file
system */
int f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
int f_spare[9]; /* spare for later */
char f_mntonname[MNAMELEN]; /* directory on which
mounted */
char f_mntfromname[MNAMELEN];/* mounted filesystem */
union mount_info mount_info; /* mount options */
};
MAP_FAILED is:
/usr/include/sys/mman.h: #define MAP_FAILED (-1L) /* unsuccessful return from mmap() */
Well, I'd say that's a bug in OSF's header files. MAP_FAILED
should be defined to (void *)-1, not -1. Maybe if you put this to lib/compat.h:#undef MAP_FAILED #define MAP_FAILED (void *)-1
This didn't help.
source='file-cache.c' object='file-cache.o' libtool=no DEPDIR=.deps
depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H
-I. -I. -I../.. -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include -
I/usr/pkg/include -c file-cache.c
cc: Warning: /usr/include/sys/mman.h, line 172: The redefinition of
the macro "MAP_FAILED" conflicts with a current definition because
the replacement lists differ. The redefinition is now in effect.
#define MAP_FAILED (-1L) /* unsuccessful return from mmap() */
-------------------------^
cc: Error: file-cache.c, line 70: In this statement, "cache-
mmap_base" and "(-1)" may not be compared for equality or inequality. if (cache->mmap_base == MAP_FAILED) { --------------------^ cc: Error: file-cache.c, line 79: In this statement, "cache- mmap_base" and "(-1)" may not be compared for equality or inequality. if (cache->mmap_base == MAP_FAILED) { --------------------^ *** Exit 1 Stop.