~ubuntu-branches/ubuntu/jaunty/dvd+rw-tools/jaunty

« back to all changes in this revision

Viewing changes to debian/patches/04-kfreebsd.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-02-05 10:06:00 UTC
  • mfrom: (0.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090205100600-m37w7v182r6zsy5m
Tags: 7.1-4
* Correcting spelling mistake in rpl8 manpage, thanks to James
  Youngman <jay@gnu.org> (Closes: #474038).
* Updating vcs fields in control file.
* Using patch-stamp rather than patch in rules file.
* Replacing obsolete dh_clean -k with dh_prep.
* Updating rules to current state of the art.
* Updating year in copyright file.
* Using quilt rather than dpatch.
* Prefixing debhelper files with package name.
* Adding patch from Kees Cook <kees@debian.org> to fix wctomb called
  with too small a buffer, patch originally taken from fedora (Closes:
  #497833).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Petr Salinger <Petr.Salinger@seznam.cz>
 
2
Description: FTBFS on GNU/kFreeBSD (Closes: #374841).
 
3
 
 
4
diff -Naurp dvd+rw-tools.orig/Makefile.m4 dvd+rw-tools/Makefile.m4
 
5
--- dvd+rw-tools.orig/Makefile.m4       2008-03-02 17:17:09.000000000 +0000
 
6
+++ dvd+rw-tools/Makefile.m4    2008-04-01 09:03:41.000000000 +0000
 
7
@@ -14,6 +14,7 @@ ifelse(substr(OS,0,7),[MINGW32],[define(
 
8
 ifelse(OS,NetBSD,[define([OS],[BSD])CXXFLAGS+=-D__unix])
 
9
 ifelse(OS,OpenBSD,[define([OS],[BSD])])
 
10
 ifelse(OS,FreeBSD,[define([OS],[BSD])LDLIBS=-lcam])
 
11
+ifelse(OS,GNU/kFreeBSD,[define([OS],[Linux])LDLIBS=-lcam])
 
12
 ifelse(OS,IRIX64,[define([OS],[IRIX])])
 
13
 
 
14
 ifelse(OS,Darwin,[
 
15
@@ -188,7 +189,7 @@ CC  =gcc
 
16
 CFLAGS +=$(WARN) -O2 -D_REENTRANT
 
17
 CXX    =g++
 
18
 CXXFLAGS+=$(WARN) -O2 -fno-exceptions -D_REENTRANT
 
19
-LDLIBS =-lpthread
 
20
+LDLIBS +=-lpthread
 
21
 LINK.o =$(LINK.cc)
 
22
 
 
23
 prefix?=/usr/local
 
24
diff -Naurp dvd+rw-tools.orig/growisofs.c dvd+rw-tools/growisofs.c
 
25
--- dvd+rw-tools.orig/growisofs.c       2008-03-04 09:15:03.000000000 +0000
 
26
+++ dvd+rw-tools/growisofs.c    2008-04-01 09:03:41.000000000 +0000
 
27
@@ -403,7 +403,7 @@
 
28
 #define _LARGEFILE64_SOURCE
 
29
 #define _FILE_OFFSET_BITS 64
 
30
 
 
31
-#if defined(__linux)
 
32
+#if defined(__linux) || defined(__GLIBC__)
 
33
 /* ... and "engage" glibc large file support */
 
34
 # ifndef _GNU_SOURCE
 
35
 #  define _GNU_SOURCE
 
36
@@ -459,7 +459,7 @@
 
37
 # define FATAL_START(e)        (0x80|(e))
 
38
 # define FATAL_MASK     0x7F
 
39
 
 
40
-#ifdef __FreeBSD__
 
41
+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 
42
 # include <sys/syscall.h>
 
43
 # ifndef SYS_mlockall
 
44
 #  define SYS_mlockall 324
 
45
@@ -995,7 +995,7 @@ char *setup_fds (char *device)
 
46
     goto open_rw;
 
47
 }
 
48
 
 
49
-#elif defined(__FreeBSD__)
 
50
+#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
 
51
 
 
52
 #include <sys/cdio.h>
 
53
 #include <camlib.h>
 
54
@@ -2937,7 +2937,7 @@ int main (int argc, char *argv[])
 
55
            if (setrlimit(RLIMIT_MEMLOCK,&rlim)) break;
 
56
        }
 
57
 # endif
 
58
-# ifdef __FreeBSD__
 
59
+# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
 
60
        syscall(SYS_mlockall,3);
 
61
 # else
 
62
        mlockall(MCL_CURRENT|MCL_FUTURE);
 
63
diff -Naurp dvd+rw-tools.orig/transport.hxx dvd+rw-tools/transport.hxx
 
64
--- dvd+rw-tools.orig/transport.hxx     2008-03-01 10:34:43.000000000 +0000
 
65
+++ dvd+rw-tools/transport.hxx  2008-04-01 09:03:41.000000000 +0000
 
66
@@ -483,7 +483,7 @@ public:
 
67
     {  return 1;   }
 
68
 };
 
69
 
 
70
-#elif defined(__FreeBSD__)
 
71
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 
72
 
 
73
 #include <sys/ioctl.h>
 
74
 #include <camlib.h>