summaryrefslogtreecommitdiff
path: root/sysutils/vobcopy/files/patch-vobcopy.h
blob: b0d24cc2a1664d9744cb2526b1960600ffc22364 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- vobcopy.h.orig	Mon Nov 13 19:57:24 2006
+++ vobcopy.h	Mon Dec  4 23:57:12 2006
@@ -19,7 +19,6 @@
 
 #if ( defined( __unix__ ) || defined( unix )) && !defined( USG )
 #include <sys/param.h>
-#else
 #endif
 
 #if defined( __GNUC__ ) && \
@@ -31,6 +30,8 @@
 /* by some bugreport:*/
 #if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun )
 #include <stdint.h>
+#else
+#include <inttypes.h>
 #endif
 
 /*for/from play_title.c*/
@@ -66,24 +67,23 @@
 /* //////////  *BSD //////////  */
 #if ( defined( BSD ) && ( BSD >= 199306 ) )
 
-#  if  !defined( __NetBSD__ ) ) || \
-       ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) )
-#include <sys/mount.h>
-#define USE_STATFS 1
+#  if ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) || \
+      ( defined( __FreeBSD__) && ( __FreeBSD_version >= 500040 ) )
+#include <sys/statvfs.h>
 
 #  else
 
-#include <sys/statvfs.h>
+#include <sys/mount.h>
+#define USE_STATFS 1
 
 #  endif
 
-#  if defined(NetBSD)
-
-#include <sys/param.h>
+#  if defined(__NetBSD__) || defined(__FreeBSD__)
 
 #define USE_GETMNTINFO
 
-#    if ( __NetBSD_Version__ < 200040000 )
+#    if (defined( __NetBSD__ ) && ( __NetBSD_Version__ < 200040000 )) || \
+        (defined( __FreeBSD__ ))
 
 #include <sys/mount.h>
 #define USE_STATFS_FOR_DEV
@@ -170,7 +170,10 @@
 
 #include "dvd.h"
 
+/* BSD already have off_t definition */
+#if !(defined(BSD) && (BSD >= 199306))
 #define off_t __off64_t
+#endif
 
 void usage(char *);
 int add_end_slash( char * );