diff -uNr lib/vpu/Makefile lib.modified/vpu/Makefile
--- lib/vpu/Makefile	2009-10-16 09:57:54.000000000 -0500
+++ lib.modified/vpu/Makefile	2009-10-16 10:03:25.000000000 -0500
@@ -1,4 +1,4 @@
-CC=$(CROSS_COMPILE)gcc
+CXX=$(CROSS_COMPILE)g++
 AR=$(CROSS_COMPILE)ar
 
 
@@ -19,14 +19,14 @@
 ifeq "$(PLATFORM)" "" 
 	$(error "you must specify PLATFORM variable")
 endif
-	$(CC) -D$(PLATFORM) -Wall -O2 -c $^ -o $@
+	$(CXX) -D$(PLATFORM) -Wall -O2 -c $^ -o $@
 
 #$(LIB): $(OBJ)
 #	rm -f $(LIB)
 #	$(AR) -r $(LIB)  $(OBJ)
 #	rm $(OBJ)
 $(LIBNAME).so: $(OBJ)
-	$(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
+	$(CXX) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
 
 $(LIBNAME).a: $(OBJ)
 	$(AR) -rc $@  $^
diff --exclude=.svn -uNr lib/vpu/vpu_io.c lib.modified/vpu/vpu_io.c
--- lib/vpu/vpu_io.c	2009-10-16 09:57:54.000000000 -0500
+++ lib.modified/vpu/vpu_io.c	2009-10-16 10:03:25.000000000 -0500
@@ -41,6 +41,7 @@
 static int vpu_fd = -1;
 static unsigned long vpu_reg_base;
 
+vpu_mem_desc bit_work_addr;
 unsigned int system_rev;
 
 int IOSystemShutdown(void);
diff --exclude=.svn -uNr lib/vpu/vpu_io.h lib.modified/vpu/vpu_io.h
--- lib/vpu/vpu_io.h	2009-10-16 09:57:54.000000000 -0500
+++ lib.modified/vpu/vpu_io.h	2009-10-16 10:03:25.000000000 -0500
@@ -44,8 +44,6 @@
 #define VPU_IOC_LHD             _IO(VPU_IOC_MAGIC, 5)
 #define	VPU_IOC_VL2CC_FLUSH	_IO(VPU_IOC_MAGIC, 6)
 
-vpu_mem_desc bit_work_addr;
-
 int IOGetPhyMem(vpu_mem_desc * buff);
 int IOFreePhyMem(vpu_mem_desc * buff);
 int IOGetVirtMem(vpu_mem_desc * buff);
diff --exclude=.svn -uNr lib/vpu/vpu_lib.c lib.modified/vpu/vpu_lib.c
--- lib/vpu/vpu_lib.c	2009-10-16 09:57:54.000000000 -0500
+++ lib.modified/vpu/vpu_lib.c	2009-10-16 10:03:25.000000000 -0500
@@ -151,14 +151,14 @@
 
 	/* Copy full Microcode to Code Buffer allocated on SDRAM */
 	if (cpu_is_mx27_rev(CHIP_REV_2_0) > 0) {
-		for (i = 0; i < sizeof(bit_code2) / sizeof(bit_code2[0]);
+		for (i = 0; i < (int) (sizeof(bit_code2) / sizeof(bit_code2[0]));
 								i += 2) {
 			data = (unsigned int)((bit_code2[i] << 16) |
 							bit_code2[i + 1]);
 			((unsigned int *)virt_codeBuf)[i / 2] = data;
 		}
 	} else {
-		for (i = 0; i < sizeof(bit_code) / sizeof(bit_code[0]);
+		for (i = 0; i < (int) (sizeof(bit_code) / sizeof(bit_code[0]));
 								i += 2) {
 			data = (unsigned int)((bit_code[i] << 16) |
 							bit_code[i + 1]);
@@ -1062,7 +1062,7 @@
 				return RETCODE_INVALID_PARAM;
 			}
 
-			GetParaSet(handle, 0, param);
+			GetParaSet(handle, 0, (EncParamSet *) param);
 			break;
 		}
 
@@ -1076,7 +1076,7 @@
 				return RETCODE_INVALID_PARAM;
 			}
 
-			GetParaSet(handle, 1, param);
+			GetParaSet(handle, 1, (EncParamSet *) param);
 			break;
 		}
 
@@ -1150,7 +1150,7 @@
 			if (param == 0) {
 				return RETCODE_INVALID_PARAM;
 			}
-			GetParaSet(handle, 1, param);
+			GetParaSet(handle, 1, (EncParamSet *) param);
 			break;
 		}
 
@@ -1162,7 +1162,7 @@
 			if (param == 0) {
 				return RETCODE_INVALID_PARAM;
 			}
-			GetParaSet(handle, 2, param);
+			GetParaSet(handle, 2, (EncParamSet *) param);
 			break;
 		}
 
@@ -1174,7 +1174,7 @@
 			if (param == 0) {
 				return RETCODE_INVALID_PARAM;
 			}
-			GetParaSet(handle, 0, param);
+			GetParaSet(handle, 0, (EncParamSet *) param);
 			break;
 		}
 
@@ -2232,7 +2232,7 @@
 			if (param == 0) {
 				return RETCODE_INVALID_PARAM;
 			}
-			SetParaSet(handle, 0, param);
+			SetParaSet(handle, 0, (DecParamSet *) param);
 			break;
 		}
 
@@ -2244,7 +2244,7 @@
 			if (param == 0) {
 				return RETCODE_INVALID_PARAM;
 			}
-			SetParaSet(handle, 1, param);
+			SetParaSet(handle, 1, (DecParamSet *) param);
 			break;
 		}
 
diff --exclude=.svn -uNr lib/vpu/vpu_lib.h lib.modified/vpu/vpu_lib.h
--- lib/vpu/vpu_lib.h	2009-10-16 09:57:54.000000000 -0500
+++ lib.modified/vpu/vpu_lib.h	2009-10-16 10:03:25.000000000 -0500
@@ -424,7 +424,7 @@
 
 #define mxc_cpu()               (system_rev >> 12)
 #define mxc_is_cpu(part)        ((mxc_cpu() == part) ? 1 : 0)
-#define mxc_cpu_rev()           (system_rev & 0xFF)
+#define mxc_cpu_rev()           (int) (system_rev & 0xFF)
 #define mxc_cpu_is_rev(rev)     \
         ((mxc_cpu_rev() == rev) ? 1 : ((mxc_cpu_rev() < rev) ? -1 : 2))
 #define MXC_REV(type)                           \
