--- ./sysdeps/unix/sysv/linux/xstatconv.c.orig	2013-02-26 21:24:55.920149275 -0500
+++ ./sysdeps/unix/sysv/linux/xstatconv.c	2013-02-27 14:00:27.018110939 -0500
@@ -178,9 +178,36 @@
 #endif
 }
 
-int
-__xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
+#include <stdio.h>
+#include <stdlib.h>
+
+enum {
+    XCONV_IGNORE = -1,
+    XCONV_ERROR  =  0, /* default to old behavior */
+    XCONV_WARN,
+    XCONV_ABORT
+};
+static int xconv_action;  /* default to XCONV_ERROR */
+
+/* "__attribute__ ((constructor))" enables a static function to be an initializer,
+ * listed in DT_INIT_ARRAY.  Could use "ld -init=<name>" with non-static name,
+ * which would be in DT_INIT.
+ */
+static void __attribute__ ((constructor))
+xstat32conv_init (void)
 {
+    char const *ptr = getenv("_XSTAT32_EOVERFLOW");
+    if (ptr)  {
+        if (!strcmp(ptr, "ignore")) xconv_action = XCONV_IGNORE;
+        if (!strcmp(ptr, "error" )) xconv_action = XCONV_ERROR;
+        if (!strcmp(ptr, "warn"  )) xconv_action = XCONV_WARN;
+        if (!strcmp(ptr, "abort" )) xconv_action = XCONV_ABORT;
+    }
+}
+
+int __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
+{
+  int rv = 0;
   switch (vers)
     {
     case _STAT_VER_LINUX:
@@ -202,8 +229,7 @@
 	    if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
 		&& buf->st_ino != kbuf->st_ino)
 	      {
-		__set_errno (EOVERFLOW);
-		return -1;
+		rv = 0+ (EOVERFLOW<<8);
 	      }
 	  }
 #else
@@ -211,8 +237,7 @@
 	if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
 	    && buf->st_ino != kbuf->st_ino)
 	  {
-	    __set_errno (EOVERFLOW);
-	    return -1;
+	    rv = 0+ (EOVERFLOW<<8);
 	  }
 #endif
 	buf->st_mode = kbuf->st_mode;
@@ -228,8 +253,7 @@
 	if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
 	    && buf->st_size != kbuf->st_size)
 	  {
-	    __set_errno (EOVERFLOW);
-	    return -1;
+	    rv = 1+ (EOVERFLOW<<8);
 	  }
 	buf->st_blksize = kbuf->st_blksize;
 	buf->st_blocks = kbuf->st_blocks;
@@ -237,8 +261,7 @@
 	if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
 	    && buf->st_blocks != kbuf->st_blocks)
 	  {
-	    __set_errno (EOVERFLOW);
-	    return -1;
+	    rv = 2+ (EOVERFLOW<<8);
 	  }
 #ifdef _HAVE_STAT_NSEC
 	buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
@@ -278,7 +301,23 @@
       __set_errno (EINVAL);
       return -1;
     }
+  if (rv) {
+    static const char member[][10] = {"st_ino", "st_size", "st_blocks"};
+    static int once;
 
+    if (EOVERFLOW==(rv >> 8)) switch (xconv_action) {
+      case XCONV_IGNORE: return 0;
+      case XCONV_ABORT: abort();
+      case XCONV_WARN:
+        if (0==once++)  /* (threaded) race on increment; we don't care */
+          fprintf(stderr, "\n\n*** warning [once only]: xstat32 EOVERFLOW %s\n\n",
+              member[0xff & rv]);
+        /* FALL THROUGH */
+      case  XCONV_ERROR: break;
+    }
+    __set_errno (rv >> 8);
+    return -1;
+  }
   return 0;
 }
 
