File tofu-0.5.1-buildfix.diff of Package tofu

diff -ur tofu-0.5.1/libtopfield/tf_fwio.c tofu-0.5.1-patched/libtopfield/tf_fwio.c
--- tofu-0.5.1/libtopfield/tf_fwio.c	2006-02-02 13:24:16.000000000 +0200
+++ tofu-0.5.1-patched/libtopfield/tf_fwio.c	2007-07-16 22:34:19.727187899 +0300
@@ -300,7 +300,7 @@
 	int ret;
 
 	if (len > MAX_DATA_SIZE) {
-		syslog(LOG_ERR, "Attempt to send too much data (%d)", len);
+		syslog(LOG_ERR, "Attempt to send too much data (%d)", (int)len);
 		return -1;
 	}
 
diff -ur tofu-0.5.1/libtopfield/usb_io.h tofu-0.5.1-patched/libtopfield/usb_io.h
--- tofu-0.5.1/libtopfield/usb_io.h	2006-02-02 13:24:16.000000000 +0200
+++ tofu-0.5.1-patched/libtopfield/usb_io.h	2007-07-16 22:31:56.190273421 +0300
@@ -34,6 +34,16 @@
 #include <linux/types.h>
 #include <linux/version.h>
 
+#ifdef __x86_64__
+#define BITS_PER_LONG 64
+#else
+#define BITS_PER_LONG 32
+#endif
+
+#ifndef __user
+#define __user
+#endif
+
 #include <linux/usb.h>
 #include <linux/usbdevice_fs.h>