File: 10-64bit-pointer-fixes.patch

package info (click to toggle)
dx 1%3A4.4.4-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 56,128 kB
  • sloc: ansic: 365,481; cpp: 156,584; sh: 10,872; java: 10,641; makefile: 2,294; javascript: 837; awk: 444; yacc: 327
file content (33 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (7)
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
From: Daniel Kobras <kobras@debian.org>
Subject: Trying to store a pointer in an int is a bad idea on 64bit platforms
 This patch fixes various issues all over the place due to missing
 function declarations or coding errors.
 Patch for hwTmesh.c thanks to dann frazier <dannf@hp.com>.

---
 include/dx/advanced.h       |    3 ++-
 src/exec/hwrender/hwTmesh.c |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/include/dx/advanced.h
+++ b/include/dx/advanced.h
@@ -42,7 +42,8 @@
 #include <sys/mman.h>
 typedef msemaphore lock_type;
 #else
-typedef volatile int lock_type;
+/* Must be large enough to hold a pointer */
+typedef volatile unsigned long lock_type;
 #endif
 
 void DXenable_locks(int enable);
--- a/src/exec/hwrender/hwTmesh.c
+++ b/src/exec/hwrender/hwTmesh.c
@@ -27,6 +27,7 @@
 #include "hwTmesh.h"
 #include "hwMemory.h"
 #include "hwWindow.h"
+#include "hwObjectHash.h"
 
 #include "hwDebug.h"