diff -ru libdvdread-original/dvdread/bswap.h libdvdread/dvdread/bswap.h
--- libdvdread-original/dvdread/bswap.h	Sun Dec 15 00:09:12 2002
+++ libdvdread/dvdread/bswap.h	Fri Jul 23 12:06:10 2004
@@ -65,7 +65,7 @@
  * functionality! 
  */
 
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__)
+#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined( __BEOS__ )
 #define B2N_16(x) \
  x = ((((x) & 0xff00) >> 8) | \
       (((x) & 0x00ff) << 8))
diff -ru libdvdread-original/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
--- libdvdread-original/dvdread/dvd_reader.c	Thu Feb 13 22:31:21 2003
+++ libdvdread/dvdread/dvd_reader.c	Fri Jul 23 12:11:59 2004
@@ -344,14 +344,26 @@
 
 	/* Resolve any symlinks and get the absolut dir name. */
 	{
+#ifdef __BEOS__
+	    char *current_path;
+#endif
 	    char *new_path;
+#ifndef __BEOS__
 	    int cdir = open( ".", O_RDONLY );
 	    
 	    if( cdir >= 0 ) {
+#else
+	    current_path = getcwd( NULL, PATH_MAX );
+	    if( current_path ) {
+#endif
 		chdir( path_copy );
 		new_path = getcwd( NULL, PATH_MAX );
+#ifndef __BEOS__
 		fchdir( cdir );
 		close( cdir );
+#else
+		chdir( current_path );
+#endif
 		if( new_path ) {
 		    free( path_copy );
 		    path_copy = new_path;
