--- oprofile-0.9.3.orig/daemon/liblegacy/opd_kernel.c	2009-03-06 10:37:16.000000000 -0500
+++ oprofile-0.9.3/daemon/liblegacy/opd_kernel.c	2009-03-06 10:38:59.000000000 -0500
@@ -349,6 +349,14 @@
  * If the sample could not be located in a module, it is treated
  * as a kernel sample.
  */
+ 
+#ifndef query_module
+int query_module(char const * name, int which, void *buf, size_t bufsize,
+     size_t *ret) {
+  return 0;
+}
+#endif
+
 static void opd_handle_module_sample(unsigned long eip, u32 counter)
 {
 	struct opd_module * module;
