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"
 
