$OpenBSD: patch-import_iodump_c,v 1.1.1.1 2004/06/18 18:56:43 sturm Exp $
--- import/iodump.c.orig	2003-04-02 01:02:43.000000000 -0800
+++ import/iodump.c	2004-04-29 19:46:40.000000000 -0700
@@ -37,7 +37,9 @@
 #include "dvd_reader.h"
 #endif
 
-#if defined(__bsdi__) || defined(__FreeBSD__) || defined(__APPLE__)
+int dvd_read(int arg_title, int arg_chapter, int arg_angle);
+
+#ifdef SYS_BSD
 typedef	off_t off64_t;
 #define	lseek64 lseek
 #endif
@@ -450,7 +452,6 @@ void tccat_thread(info_t *ipipe)
 	
 	p_readwrite(ipipe->fd_in, ipipe->fd_out);
 	
-	close(ipipe->fd_in);
 	
 	break;
 	
@@ -473,6 +474,8 @@ void tccat_thread(info_t *ipipe)
 	exit(1);
       }
       
+      close(ipipe->fd_in);
+
     }//process files
     
     close_directory();
