>From nobody Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Wed Jan 18 14:04:34 2006 +0100 Subject: fix compilation of dirent->d_type --- Makefile | 3 +++ cache.h | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) 5232f9128ad9d10368525fe709954acc2d6f49b3 diff --git a/Makefile b/Makefile index 5782e2a..c3bae0f 100644 --- a/Makefile +++ b/Makefile @@ -329,6 +329,9 @@ ifdef NEEDS_NSL LIBS += -lnsl SIMPLE_LIB += -lnsl endif +ifdef NO_DTYPE + COMPAT_CFLAGS += -DNO_DTYPE +endif ifdef NO_STRCASESTR COMPAT_CFLAGS += -DNO_STRCASESTR COMPAT_OBJS += compat/strcasestr.o diff --git a/cache.h b/cache.h index 29c9e81..3846fb9 100644 --- a/cache.h +++ b/cache.h @@ -10,13 +10,21 @@ #define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11) #endif -#ifdef DT_UNKNOWN +#ifndef NO_DTYPE #define DTYPE(de) ((de)->d_type) #else +#ifndef DT_UNKNOWN #define DT_UNKNOWN 0 +#endif +#ifndef DT_DIR #define DT_DIR 1 +#endif +#ifndef DT_REG #define DT_REG 2 +#endif +#ifndef DT_LNK #define DT_LNK 3 +#endif #define DTYPE(de) DT_UNKNOWN #endif -- 1.1.2-ge577