X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs%2F.git;a=blobdiff_plain;f=yportenv.h;h=dade8e4c0f91a5fb5163b4c399ade3a3575bb2f6;hp=6f80d2bdb3277911520f63756ecb20a5dd77dc63;hb=087046078841616093c6e6babe66eba1bd0ce0d6;hpb=18a3dea73d912bdf5bf9a7bf0714ed561d1b5805 diff --git a/yportenv.h b/yportenv.h index 6f80d2b..dade8e4 100644 --- a/yportenv.h +++ b/yportenv.h @@ -15,7 +15,7 @@ * * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. * - * $Id: yportenv.h,v 1.11 2004-09-19 09:21:33 charles Exp $ + * $Id: yportenv.h,v 1.13 2004-10-10 17:54:59 charles Exp $ * */ @@ -33,6 +33,7 @@ // Linux kernel #include "linux/kernel.h" +#include "linux/version.h" #include "linux/mm.h" #include "linux/string.h" #include "linux/slab.h" @@ -48,6 +49,13 @@ #define YAFFS_ROOT_MODE 0666 #define YAFFS_LOSTNFOUND_MODE 0666 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +#define Y_CURRENT_TIME CURRENT_TIME.tv_sec +#define Y_TIME_CONVERT(x) (x).tv_sec +#else +#define Y_CURRENT_TIME CURRENT_TIME +#define Y_TIME_CONVERT(x) (x) +#endif #define yaffs_SumCompare(x,y) ((x) == (y)) #define yaffs_strcmp(a,b) strcmp(a,b) @@ -123,3 +131,4 @@ extern unsigned yaffs_traceMask; #endif #endif +