summaryrefslogtreecommitdiff
path: root/graphics/lprof/patches/patch-ag
blob: 54920c130f92d6003addc6000eb10a708d3bf5de (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-ag,v 1.2 2011/12/22 16:31:16 joerg Exp $

--- src/qtMeasurementTool/qtiffio.cpp.orig	2005-08-20 01:11:52.000000000 +0000
+++ src/qtMeasurementTool/qtiffio.cpp
@@ -17,6 +17,7 @@
 // 
 
 #include <stdio.h>
+#include <sys/types.h>
 #include <sys/mman.h>
 
 #include <tiffio.h>
@@ -69,19 +70,6 @@ static toff_t tiff_size(thandle_t handle
   return iod->size();
 }
 
-//! QIODevice / libtiff mmap wrapper
-/*! \warning always returns MAP_FAILED.
-*/
-static int tiff_mmap(thandle_t handle,tdata_t* data,toff_t* size) {
-  return (int) MAP_FAILED;
-}
-
-//! QIODevice / libtiff write wrapper
-/*! \warning because you can't mmap, this is a dummy.
-*/
-static void tiff_unmap(thandle_t handle, tdata_t data, toff_t size) {
-}
-
 //! QImageIO read handler for TIFF files.
 //
 static void read_tiff_image(QImageIO *iio) {
@@ -103,8 +91,8 @@ static void read_tiff_image(QImageIO *ii
                            tiff_seek,
                            tiff_close,
                            tiff_size,
-                           tiff_mmap,
-                           tiff_unmap );
+                           NULL,
+                           NULL );
   
   if(tif) {
     unsigned width, height,size;