Hello,first of all I don't know if this is the right ML for this question or there is a more appropriate place to discuss about it. But I will give it a shot :).
Today I was trying to crosscompile a x86 haiku-image on a linux-ppc host but the compilation ended complaining about __swap_int{16,32,64} undefined in the scope.
Having a look at the source code it seems that the problem is a missing header file (ByteOrder.h) so I tried to include it producing the attached patch. Is that the right place for including that header?
Now the compiler can't find the header so I think I should edit the Jamfile to pass the the directory where ByteOrder.h resides to gcc but at the moment I don't know how to do it.
I am going to read something about jam but the point is: am I moving in the right way or not? :)
thank you all Marco
Index: src/add-ons/kernel/file_systems/bfs/bfs_endian.h =================================================================== --- src/add-ons/kernel/file_systems/bfs/bfs_endian.h (revision 24506) +++ src/add-ons/kernel/file_systems/bfs/bfs_endian.h (working copy) @@ -27,6 +27,7 @@ # define HOST_ENDIAN_TO_BFS_INT64(value) value #elif defined(BFS_LITTLE_ENDIAN_ONLY) && B_HOST_IS_BENDIAN \ || defined(BFS_BIG_ENDIAN_ONLY) && B_HOST_IS_LENDIAN +#include <ByteOrder.h> /* host is big endian, BFS is little endian or vice versa */ # define BFS_ENDIAN_TO_HOST_INT16(value) __swap_int16(value) # define BFS_ENDIAN_TO_HOST_INT32(value) __swap_int32(value)