diff -uwr ipac-ng-1.31.orig/access/files/rules.y ipac-ng-1.31/access/files/rules.y
--- ipac-ng-1.31.orig/access/files/rules.y	2004-07-15 15:59:58.000000000 +0200
+++ ipac-ng-1.31/access/files/rules.y	2007-04-21 13:17:22.000000000 +0200
@@ -258,6 +258,7 @@
 
 %%
 
+#if 0
 static void
 print_ext(const raw_rule_type *r)
 {
@@ -267,6 +268,7 @@
 		ul = ul->next;
 	}
 }
+#endif
 
 int 
 parse_rules(FILE *in, raw_rule_type **rules) 
diff -uwr ipac-ng-1.31.orig/agents/iptables/iptables.c ipac-ng-1.31/agents/iptables/iptables.c
--- ipac-ng-1.31.orig/agents/iptables/iptables.c	2007-04-21 18:22:07.000000000 +0200
+++ ipac-ng-1.31/agents/iptables/iptables.c	2007-04-21 13:17:20.000000000 +0200
@@ -100,12 +100,14 @@
 
 typedef struct iface_struct s_iface;
 
+#if !defined(ipt_get_revision)
 struct ipt_get_revision
 {
 	char name[IPT_FUNCTION_MAXNAMELEN-1];
 
 	u_int8_t revision;
 };
+#endif
 
 struct iptables_rule_match
 {
@@ -1503,6 +1505,7 @@
 	return ret;
 }
 
+#if 0
 /*
  * Try to atomically replace rule in kernel return 0 in case all right, 1 otherwice
  */
@@ -1526,6 +1529,7 @@
 	free(e);
 	return ret;
 }
+#endif
 
 /*
  * Try to append rule into kernel return 0 in case all right, 1 otherwice
@@ -1583,6 +1587,7 @@
 	return ret;
 }
 
+#if 0
 static int
 delete_num_rule (char *chain, int num)
 {
@@ -1593,7 +1598,7 @@
 	free(e);
 	return ret;
 }
-
+#endif
 
 
 /** Setup chains if they doesn't exist 
@@ -1829,7 +1834,7 @@
 
 int
 iptables_ipac_check(void){
-	int tmp=0;	
+	unsigned int tmp=0;	
 
 	if ((iptc_is_chain("ipac~fi", handle) +
 		iptc_is_chain("ipac~fo", handle))!=2)
diff -uwr ipac-ng-1.31.orig/agents/iptables/libip4tc.c ipac-ng-1.31/agents/iptables/libip4tc.c
--- ipac-ng-1.31.orig/agents/iptables/libip4tc.c	2007-04-21 18:22:01.000000000 +0200
+++ ipac-ng-1.31/agents/iptables/libip4tc.c	2007-04-21 13:17:20.000000000 +0200
@@ -123,6 +123,7 @@
 
 #define IP_PARTS(n) IP_PARTS_NATIVE(ntohl(n))
 
+#if 0
 int
 dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle)
 {
@@ -172,6 +173,7 @@
 	printf("\n");
 	return 0;
 }
+#endif
 
 static unsigned char *
 is_same(const STRUCT_ENTRY *a, const STRUCT_ENTRY *b, unsigned char *matchmask)
diff -uwr ipac-ng-1.31.orig/agents/iptables/libiptc.c ipac-ng-1.31/agents/iptables/libiptc.c
--- ipac-ng-1.31.orig/agents/iptables/libiptc.c	2007-04-21 18:22:01.000000000 +0200
+++ ipac-ng-1.31/agents/iptables/libiptc.c	2007-04-21 13:17:20.000000000 +0200
@@ -711,7 +711,7 @@
 static int iptcc_compile_table_prep(TC_HANDLE_T h, unsigned int *size)
 {
 	struct chain_head *c;
-	unsigned int offset = 0, num = 0;
+	int offset = 0, num = 0;
 	int ret = 0;
 
 	/* First pass: calculate offset for every rule */
@@ -727,7 +727,7 @@
 		  + ALIGN(sizeof(struct ipt_error_target));
 
 	/* ruleset size is now in offset */
-	*size = offset;
+	*size = (unsigned int)offset;
 	return num;
 }
 
@@ -798,7 +798,7 @@
 {
 	TC_HANDLE_T h;
 	STRUCT_GETINFO info;
-	int tmp;
+	unsigned int tmp;
 	socklen_t s;
 
 	iptc_fn = TC_INIT;
@@ -908,7 +908,9 @@
 	return 0;
 }
 
+#if 0
 static int dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle);
+#endif
  
 void
 TC_DUMP_ENTRIES(const TC_HANDLE_T handle)
diff -uwr ipac-ng-1.31.orig/storage/gdbm/gdbm.c ipac-ng-1.31/storage/gdbm/gdbm.c
--- ipac-ng-1.31.orig/storage/gdbm/gdbm.c	2004-04-18 22:26:12.000000000 +0200
+++ ipac-ng-1.31/storage/gdbm/gdbm.c	2007-04-21 13:17:20.000000000 +0200
@@ -1107,15 +1107,18 @@
 }
 
 int gdbm_ipac_get_summary(timestamp_t timestamp_s, timestamp_t timestamp_e,
-				data_record_type **data)
+				data_record_type **data, char *filter)
 {
 	fprintf(stderr, "gdbm storage does not support summary request\n");
 	return -1;
 }
 
 int gdbm_ipac_get_records(timestamp_t timestamp_s, timestamp_t timestamp_e,
-				data_record_type **data)
+				data_record_type **data, char *filter)
 {
+	if (filter)
+		fprintf(stderr, "gdbm storage does not support rule_name filtering\n");
+
         if (timestamp_e && (timestamp_e != timestamp_s)) {
          //if we have both timestamps and beginning is different from end
         	timestamp_t *tlist;
diff -uwr ipac-ng-1.31.orig/storage/gdbm/ipac_gdbm.h ipac-ng-1.31/storage/gdbm/ipac_gdbm.h
--- ipac-ng-1.31.orig/storage/gdbm/ipac_gdbm.h	2003-09-28 13:24:59.000000000 +0200
+++ ipac-ng-1.31/storage/gdbm/ipac_gdbm.h	2007-04-21 12:59:52.000000000 +0200
@@ -99,9 +99,9 @@
 		timestamp_t **data, timestamp_t *just_before,
 		timestamp_t *just_after, char *);
 int gdbm_ipac_get_records(timestamp_t timestamp_s, timestamp_t timestamp_e,
-		data_record_type **data);
+		data_record_type **data, char *filter);
 int gdbm_ipac_get_summary(timestamp_t timestamp_s, timestamp_t timestamp_e,
-                data_record_type **data);
+                data_record_type **data, char *filter);
 int gdbm_ipac_delete_record(timestamp_t timestamp);
 void gdbm_ipac_close();
 
diff -uwr ipac-ng-1.31.orig/storage/plain-file/plain-file.c ipac-ng-1.31/storage/plain-file/plain-file.c
--- ipac-ng-1.31.orig/storage/plain-file/plain-file.c	2003-09-28 13:24:59.000000000 +0200
+++ ipac-ng-1.31/storage/plain-file/plain-file.c	2007-04-21 13:17:20.000000000 +0200
@@ -41,9 +41,9 @@
 		timestamp_t **data, timestamp_t *just_before,
 		timestamp_t *just_after, char *);
 int plain_file_ipac_get_records(timestamp_t timestamp_s,timestamp_t timestamp_e,
-		data_record_type **data);
+		data_record_type **data, char *filter);
 int plain_file_ipac_get_summary(timestamp_t timestamp_s,timestamp_t timestamp_e,
-                data_record_type **data);
+                data_record_type **data, char *filter);
 int plain_file_ipac_get_raw_list(char *ag_name, char *login, 
 		raw_rule_type **data);
 int plain_file_ipac_delete_record(timestamp_t timestamp);
@@ -379,7 +379,7 @@
 }
 
 int plain_file_ipac_get_summary(timestamp_t timestamp_s,timestamp_t timestamp_e,
-                data_record_type **data)
+                data_record_type **data, char *filter)
 {
 	fprintf(stderr, "plain file storage does not support summary request\n");
 	return -1;
@@ -387,8 +387,11 @@
 
 
 int plain_file_ipac_get_records(timestamp_t timestamp_s,timestamp_t timestamp_e,
-		data_record_type **data)
+		data_record_type **data, char *filter)
 {
+	if (filter)
+		fprintf(stderr, "plain file storage does not support rule_name filtering\n");
+	
         if (timestamp_e && (timestamp_e != timestamp_s)) {
          //if we have both timestamps and beginning is different from end
         	timestamp_t *tlist;
--- ipac-ng-1.31.orig/configure	2004-08-25 00:33:23.000000000 +0200
+++ ipac-ng-1.31/configure	2007-04-21 20:57:40.000000000 +0200
@@ -4195,6 +4195,8 @@
 echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_query" >&6
 if test $ac_cv_lib_mysqlclient_mysql_query = yes; then
   HAVE_LIBMYSQL=yes
+  echo "$as_me:$LINENO: WARNING: mysql support disabled. See: http://bugs.mysql.com/bug.php?id=19455"
+  HAVE_LIBMYSQL=no
 else
   HAVE_LIBMYSQL=no
 fi
