summaryrefslogtreecommitdiff
path: root/multimedia/libdvdread/patches/patch-ab
blob: 2dd7efde81ba34166b3e2e359525e5c4218907a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ab,v 1.5 2006/04/12 17:19:36 joerg Exp $

--- dvdread/dvd_reader.c.orig	2006-01-22 15:45:29.000000000 +0000
+++ dvdread/dvd_reader.c
@@ -33,7 +33,7 @@
 #include <limits.h>
 #include <dirent.h>
  
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DARWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DARWIN__) || defined(__DragonFly__)
 #define SYS_BSD 1
 #endif
 
@@ -404,7 +404,9 @@ static char *sun_block2char( const char 
 static char *bsd_block2char( const char *path )
 {
   char *new_path;
-
+#if defined(__DragonFly__) || defined(__FreeBSD__)
+  return (char *) strdup( path ); /* Do not add an r for DragonFly and FreeBSD */
+#endif
   /* If it doesn't start with "/dev/" or does start with "/dev/r" exit */ 
   if( strncmp( path, "/dev/",  5 ) || !strncmp( path, "/dev/r", 6 ) ) 
     return (char *) strdup( path );