--- miscemu/preloader.c Wed Nov 29 00:14:21 2006 +++ miscemu/preloader.c.orig Tue Nov 28 23:55:35 2006 @@ -164,19 +164,6 @@ static unsigned int page_size, page_mask; static char *preloader_start, *preloader_end; -#ifndef ElfW -# if defined(__FreeBSD__) -# include -# if __ELF_WORD_SIZE == 32 -typedef Elf32_Auxinfo Elf32_auxv_t; -# define ElfW(type) Elf32_##type -# elif __ELF_WORD_SIZE == 64 -typedef Elf64_Auxinfo Elf64_auxv_t; -# define ElfW(type) Elf64_##type -# endif -# endif -#endif - struct wld_link_map { ElfW(Addr) l_addr; ElfW(Dyn) *l_ld; @@ -342,15 +329,11 @@ static inline int wld_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) { -#if defined(linux) int ret; __asm__ __volatile__ ( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx" : "=a" (ret) : "0" (SYS_prctl), "r" (option), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5) ); return SYSCALL_RET(ret); -#else - return 0; -#endif } /* replacement for libc functions */