--- ./lib/file-set-size.c.org	2009-07-06 12:56:17.000000000 +0200
+++ ./lib/file-set-size.c	2009-07-06 12:54:40.000000000 +0200
@@ -43,9 +43,15 @@
 
 #ifdef HAVE_POSIX_FALLOCATE
 	if (posix_fallocate_supported) {
-		if (posix_fallocate(fd, st.st_size, size - st.st_size) == 0)
+		int err;
+		if ((err = posix_fallocate(fd, st.st_size, size - st.st_size)) == 0)
 			return 0;
 
+		if (err == EOPNOTSUPP /* AIX */ ) {
+			/* Ignore this error silently.
+			   You have to test err, because errno is not
+			   correcly set on some versions of AIX */
+		} else
 		if (errno != EINVAL /* Solaris */) {
 			if (!ENOSPACE(errno))
 				i_error("posix_fallocate() failed: %m");
