summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2012-01-04 14:28:43 -0800
committerSaul Wold <sgw@linux.intel.com>2012-01-09 21:51:49 -0800
commit644aaa87a0e161f8a37267f13d4a18f6dfcd9a4f (patch)
treea288ae6fa192c19ddb745be2aed4e9d22bfe84d7 /meta
parentfff18970706913e7fd7f4a119d798dddb44b388a (diff)
downloadopenembedded-core-644aaa87a0e161f8a37267f13d4a18f6dfcd9a4f.tar.gz
openembedded-core-644aaa87a0e161f8a37267f13d4a18f6dfcd9a4f.tar.bz2
openembedded-core-644aaa87a0e161f8a37267f13d4a18f6dfcd9a4f.zip
libxxf86dga: fix compilation with x32 toolchain
Fix type conversion for x32. For x32 the off_t is 64bit and pointers are 32bit. so the conversion of pointer to off_t was resulting into this error: | XF86DGA2.c:931:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] | cc1: some warnings being treated as errors | | make[2]: *** [XF86DGA2.lo] Error 1 Fixed it by typecasting pointer into unsigned long 1st and then again typecasting unsigned long to off_t. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/xorg-lib/libxxf86dga/libxxf86dga-1.1.2_fix_for_x32.patch30
-rw-r--r--meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.2.bb5
2 files changed, 34 insertions, 1 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libxxf86dga/libxxf86dga-1.1.2_fix_for_x32.patch b/meta/recipes-graphics/xorg-lib/libxxf86dga/libxxf86dga-1.1.2_fix_for_x32.patch
new file mode 100644
index 0000000000..30692ad9cb
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxxf86dga/libxxf86dga-1.1.2_fix_for_x32.patch
@@ -0,0 +1,30 @@
+Upstream-Status: pending
+
+Fix type conversion for x32. For x32 the off_t is 64bit and pointers are 32bit.
+so the conversion of pointer to off_t was resulting into this error:
+
+| XF86DGA2.c:931:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+| cc1: some warnings being treated as errors
+|
+| make[2]: *** [XF86DGA2.lo] Error 1
+
+Fixed it by typecasting pointer into unsigned long 1st and then again typecasting
+unsigned long to off_t.
+
+Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/01/04
+
+
+Index: libXxf86dga-1.1.2/src/XF86DGA2.c
+===================================================================
+--- libXxf86dga-1.1.2.orig/src/XF86DGA2.c 2010-10-06 21:17:11.000000000 -0700
++++ libXxf86dga-1.1.2/src/XF86DGA2.c 2012-01-04 14:21:36.275971172 -0800
+@@ -928,7 +928,7 @@ DGAMapPhysical(
+ if ((pMap->fd = open(name, O_RDWR)) < 0)
+ return False;
+ pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE,
+- MAP_FILE | MAP_SHARED, pMap->fd, (off_t)base);
++ MAP_FILE | MAP_SHARED, pMap->fd, (off_t)(unsigned long)base);
+ if (pMap->virtual == (void *)-1)
+ return False;
+ mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE);
diff --git a/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.2.bb b/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.2.bb
index 8e777c3db3..9a1c96ffa7 100644
--- a/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxxf86dga_1.1.2.bb
@@ -8,7 +8,10 @@ allows relative mouse reporting, et al. It is mainly used by games and \
emulators for games."
DEPENDS += "libxext xf86dgaproto"
-PR = "r1"
+PR = "r2"
+
+SRC_URI += "file://libxxf86dga-1.1.2_fix_for_x32.patch"
+
PE = "1"
XORG_PN = "libXxf86dga"