[eresi-dev] [patch] libelfsh compile for haiku

zadig bru zadig.bru at gmail.com
Sun Aug 17 21:10:56 UTC 2008


The following patch allows compilation of (lib)elfsh for haiku.
The change on the Makefile should be needed for all targets since
libelfsh seems to depend on libasm.

Index: libelfsh/Makefile
===================================================================
--- libelfsh/Makefile	(revision 1089)
+++ libelfsh/Makefile	(working copy)
@@ -39,6 +39,7 @@
 libelfsh32.so		: $(OBJ32)
 			@$(CC) -L../liballocproxy/ -lallocproxy \
                         -L../libaspect/ -laspect32 -DERESI32 \
+                        -L ../libasm -lasm32 \
 			$(KERNSHLIB32) -shared $(OBJ32) -o $(NAME32).so
 			@$(AR) $(NAME32).a $(OBJ32)
 			@$(RANLIB) $(NAME32).a
@@ -50,6 +51,7 @@
 libelfsh64.so		:  $(OBJ64)
 			@$(CC) -L../liballocproxy/ -lallocproxy \
                         -L../libaspect/ -laspect64 -DERESI64 \
+                        -L ../libasm -lasm32 \
 			$(KERNSHLIB64) -shared $(OBJ64) -o $(NAME64).so
 			@$(AR) $(NAME64).a $(OBJ64)
 			@$(RANLIB) $(NAME64).a
Index: libelfsh/include/libelfsh/libelfsh-compat.h
===================================================================
--- libelfsh/include/libelfsh/libelfsh-compat.h	(revision 1089)
+++ libelfsh/include/libelfsh/libelfsh-compat.h	(working copy)
@@ -16,7 +16,9 @@
  #define MAP_ANONYMOUS  MAP_ANON
 #endif

-#if !defined(__BEOS__)
+#if defined(__BEOS__)
+#include <elf.h>
+#else
 typedef char uint8;
 #endif

Index: libelfsh/include/libelfsh.h
===================================================================
--- libelfsh/include/libelfsh.h	(revision 1089)
+++ libelfsh/include/libelfsh.h	(working copy)
@@ -35,12 +35,16 @@

 #ifdef __BEOS__
 #include <bsd_mem.h>
+#include <sys/time.h>
 #endif

 #if !defined(__USE_GNU)
 #define __USE_GNU
 #endif

+#if defined( __BEOS__)
+#include <ucontext.h>
+#else
 #if ! defined(__OpenBSD__)
 #include <sys/ucontext.h>
 #endif
@@ -54,6 +58,7 @@
 #elif ! (defined(__OpenBSD__))
 #include <sys/procfs.h>
 #endif
+#endif /* BEOS */

 #endif



More information about the eresi-dev mailing list