32566db22f
git-svn-id: svn://svn.openwrt.org/openwrt/packages@10535 3c298f89-4303-0410-b956-a3cf2f4a3e73
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
Index: reiserfsprogs-3.6.19/include/reiserfs_fs.h
|
|
===================================================================
|
|
--- reiserfsprogs-3.6.19.orig/include/reiserfs_fs.h 2008-02-28 18:10:11.000000000 +0100
|
|
+++ reiserfsprogs-3.6.19/include/reiserfs_fs.h 2008-02-28 18:11:35.000000000 +0100
|
|
@@ -38,15 +38,21 @@
|
|
# define extern_inline
|
|
#endif
|
|
|
|
-#include <asm/unaligned.h>
|
|
+#define get_unaligned(ptr) \
|
|
+({ \
|
|
+ struct __attribute__((packed)) { \
|
|
+ typeof(*(ptr)) __v; \
|
|
+ } *__p = (void *)(ptr); \
|
|
+ __p->__v; \
|
|
+})
|
|
|
|
-#ifndef get_unaligned
|
|
-#if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
|
|
- defined(__PPC) || defined(powerpc) || defined(__powerpc__)
|
|
-# define get_unaligned(ptr) (*(ptr))
|
|
-# define put_unaligned(val,ptr) ((void)(*(ptr) = (val)))
|
|
-#endif
|
|
-#endif
|
|
+#define put_unaligned(val, ptr) \
|
|
+do { \
|
|
+ struct __attribute__((packed)) { \
|
|
+ typeof(*(ptr)) __v; \
|
|
+ } *__p = (void *)(ptr); \
|
|
+ __p->__v = (val); \
|
|
+} while(0)
|
|
|
|
#define get_leXX(xx,p,field) (le##xx##_to_cpu ((p)->field))
|
|
#define set_leXX(xx,p,field,val) do { (p)->field = cpu_to_le##xx(val); } while (0)
|