[Ocfs2-users] ocfs2-tools-1.2.2 compile.

Sunil Mushran Sunil.Mushran at oracle.com
Tue Feb 6 12:17:20 PST 2007


The following patch will address this issue. The fix will be provided
with the next tools release.


Index: libocfs2/include/ocfs2.h
===================================================================
--- libocfs2/include/ocfs2.h    (revision 1269)
+++ libocfs2/include/ocfs2.h    (revision 1270)
@@ -48,6 +48,9 @@

 #include "byteorder.h"

+#if !defined(offsetof)
+#   define offsetof(type,memb) ((size_t)&((type*)0)->memb)
+#endif

 #if OCFS2_FLAT_INCLUDES
 #include "o2dlm.h"


Randy Ramsdell wrote:
> Hi,
>
> The ocfs2 package compiled perfectly, but tools did not.
>
> The test setup is using opensuse10.1 - updates applied
>
> For "ocfs2-tools-1.2.2":
>
>
> In file included from include/ocfs2.h:60,
> from alloc.c:32:
> include/ocfs2_fs.h: In function ‘ocfs2_fast_symlink_chars’:
> include/ocfs2_fs.h:566: warning: implicit declaration of function ‘offsetof’
> include/ocfs2_fs.h:566: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_extent_recs_per_inode’:
> include/ocfs2_fs.h:574: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_chain_recs_per_inode’:
> include/ocfs2_fs.h:584: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_extent_recs_per_eb’:
> include/ocfs2_fs.h:594: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_local_alloc_size’:
> include/ocfs2_fs.h:604: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_group_bitmap_size’:
> include/ocfs2_fs.h:614: error: expected expression before ‘struct’
> include/ocfs2_fs.h: In function ‘ocfs2_truncate_recs_per_inode’:
> include/ocfs2_fs.h:624: error: expected expression before ‘struct’
> alloc.c: In function ‘ocfs2_init_inode’:
> alloc.c:143: warning: pointer targets in passing argument 1 of ‘strcpy’
> differ in signedness
> alloc.c: In function ‘ocfs2_init_eb’:
> alloc.c:184: warning: pointer targets in passing argument 1 of ‘strcpy’
> differ in signedness
> make[1]: *** [alloc.o] Error 1
> make[1]: Leaving directory `/root/src/ocfs2-tools-1.2.2/libocfs2'
> make: *** [libocfs2] Error 2
>
>
> Anyone know how to resolve this?
>
>
> Randy Ramsdell
> Foreclosure.com
>
> _______________________________________________
> Ocfs2-users mailing list
> Ocfs2-users at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-users
>   



More information about the Ocfs2-users mailing list