Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 45)
+++ /trunk/configure.ac	(revision 46)
@@ -8,6 +8,5 @@
 
 
-AC_ARG_VAR([LIBS],
-            [libraries to link against, e.g. -lintl])
+AC_ARG_VAR([LIBS], [libraries to link against, e.g. -lintl])
 
 dnl
@@ -353,4 +352,5 @@
   AC_MSG_RESULT(yes)
   AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[socklen_t], [type of arg3 of accept])
+  AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if you have socklen_t])
 ],[
   AC_TRY_COMPILE([
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 45)
+++ /trunk/docs/Changelog	(revision 46)
@@ -1,3 +1,7 @@
 2.2.1:
+	* fix gcc 4 warnings and build failure on x86_64 (debian bug #370808)
+	* fix compiling with Oracle (noticed by Colapinto Giovanni)
+	* fix configure.ac for most recent autoconf version
+	  (debian bug #369503)
 	* fix a regression that would make impossible local updates w/clients
 	* fix a few missing '\n' in sh_getopt.c
Index: /trunk/src/sh_files.c
===================================================================
--- /trunk/src/sh_files.c	(revision 45)
+++ /trunk/src/sh_files.c	(revision 46)
@@ -204,4 +204,5 @@
   char       * dir;
   char       * file;
+  int          tmp_reported;
   
   SL_ENTER(_("sh_files_chk"));
@@ -233,6 +234,8 @@
 
 	  BREAKEXIT(sh_files_filecheck);
+	  tmp_reported = ptr->reported; /* fix aliasing warning */ 
 	  status = sh_files_filecheck (ptr->class, dir, file, 
-				       (int *) &(ptr->reported), 0);
+				       &tmp_reported, 0);
+	  ptr->reported = tmp_reported;
 	  
 	  TPT(( 0, FIL__, __LINE__, 
Index: /trunk/src/sh_socket.c
===================================================================
--- /trunk/src/sh_socket.c	(revision 45)
+++ /trunk/src/sh_socket.c	(revision 46)
@@ -522,5 +522,9 @@
 #elif defined(SO_PEERCRED) 
   struct ucred cr;
-  int          cl = sizeof(cr);
+#ifdef HAVE_SOCKLEN_T
+  socklen_t cl = sizeof(cr);
+#else
+  int       cl = sizeof(cr);
+#endif 
 
 #elif defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
Index: /trunk/src/sh_tiger0.c
===================================================================
--- /trunk/src/sh_tiger0.c	(revision 45)
+++ /trunk/src/sh_tiger0.c	(revision 46)
@@ -913,5 +913,5 @@
       sum += n;
     }
-    while (sum < (off_t) BLOCKSIZE 
+    while (sum < (size_t) BLOCKSIZE 
 	   && n != 0);
 
Index: /trunk/src/sh_tiger1_64.c
===================================================================
--- /trunk/src/sh_tiger1_64.c	(revision 45)
+++ /trunk/src/sh_tiger1_64.c	(revision 46)
@@ -129,5 +129,5 @@
 #define roundend(a,b,c,x) \
  : "+r" (a), "+r" (b), "+r" (c) \
- : "0" (a), "1" (b), "2" (c), "m" (x), "r" (&tiger_table),\
+ : "r" (a), "r" (b), "r" (c), "m" (x), "r" (&tiger_table),\
   "i" (MASK0), "i" (MASK8), "i" (MASK16), "r" (MASK32), "r" (MASK40), "r" (MASK48) \
  : "3", "%rax","%rbx","%rcx","%rdx","%rsi", "%edi", "%r8"  );
