diff -Nu osdep/Makefile osdep/Makefile --- osdep/Makefile Mon Jun 28 17:57:00 2004 +++ osdep/Makefile Sat Sep 11 15:21:10 2004 @@ -4,6 +4,7 @@ LIBNAME = libosdep.a SRCS= shmem.c strsep.c strl.c vsscanf.c scandir.c gettimeofday.c fseeko.c \ + swab.c # timer.c ifeq ($(TARGET_ARCH_X86),yes) diff -Nu osdep/shmem.c osdep/shmem.c --- osdep/shmem.c Mon May 26 18:35:42 2003 +++ osdep/shmem.c Sat Sep 11 16:29:18 2004 @@ -20,6 +20,8 @@ #include #ifdef HAVE_SYS_MMAN_H #include +#elif defined(__BEOS__) +#include #endif #include #include diff -Nu osdep/swab.c osdep/swab.c --- osdep/swab.c Thu Jan 1 00:00:00 1970 +++ osdep/swab.c Sat Sep 11 15:23:10 2004 @@ -0,0 +1,16 @@ +#include "../bswap.h" + +#ifndef HAVE_SWAB +/* system has no swab. emulate via bswap */ +#include + +void swab(const void *from, void *to, ssize_t n) { + const int16_t *in = (int16_t*)from; + int16_t *out = (int16_t*)to; + int i; + n /= 2; + for (i = 0 ; i < n; i++) { + out[i] = bswap_16(in[i]); + } +} +#endif diff -Nu osdep/timer-lx.c osdep/timer-lx.c --- osdep/timer-lx.c Wed Aug 4 17:56:03 2004 +++ osdep/timer-lx.c Sat Sep 11 14:56:34 2004 @@ -1,6 +1,9 @@ // Precise timer routines for LINUX (C) LGB & A'rpi/ASTRAL #include +#ifdef __BEOS__ +#include +#endif #include #include #include