yaffsfs.c: Fix NULL dereference in yaffs_unmount2_reldev()
[yaffs2.git] / direct / yportenv.h
index 81da08e5c33ba592760cfe5a79b88662ecd06bbe..5a79f93583b963d715b0dee9a0b533363c1511e1 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2011 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
 #define __YPORTENV_H__
 
 
+#ifdef __rtems__
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+
+#define CONFIG_YAFFS_DIRECT 1
+#define CONFIG_YAFFS_SHORT_NAMES_IN_RAM 1
+#define CONFIG_YAFFS_YAFFS2 1
+#define CONFIG_YAFFS_PROVIDE_DEFS 1
+#define CONFIG_YAFFSFS_PROVIDE_VALUES 1
+#define CONFIG_YAFFS_DEFINES_TYPES 1
+#define CONFIG_YAFFS_USE_32_BIT_TIME_T 1
+#define NO_Y_INLINE 1
+#define loff_t off_t
+
+#endif /* __rtems__ */
+
 /* Definition of types */
 #ifdef CONFIG_YAFFS_DEFINES_TYPES
 typedef unsigned char u8;
@@ -27,7 +45,6 @@ typedef unsigned long long u64;
 typedef signed int s32;
 #endif
 
-
 #ifdef CONFIG_YAFFS_PROVIDE_DEFS
 /* File types */