diff options
Diffstat (limited to 'libglusterfs/src/compat.h')
| -rw-r--r-- | libglusterfs/src/compat.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index a6eec2ded..2bd982541 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -32,6 +32,12 @@ #include <linux/limits.h> #include <sys/xattr.h> #include <endian.h> +#ifdef HAVE_FALLOC_H +#include <linux/falloc.h> +#else +#define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ +#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */ +#endif #ifndef HAVE_LLISTXATTR @@ -340,10 +346,13 @@ char *basename_r(const char *); #endif /* THREAD_UNSAFE_BASENAME */ #ifdef THREAD_UNSAFE_DIRNAME -char *dirname_r(const char *path); +char *dirname_r(char *path); #define dirname(path) dirname_r(path) #endif /* THREAD_UNSAFE_DIRNAME */ +int gf_mkostemp (char *tmpl, int suffixlen, int flags); +#define mkostemp(tmpl, flags) gf_mkostemp(tmpl, 0, flags); + #ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC /* Linux, Solaris, Cygwin */ #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec) |
