Many files:
  Checked in e2fsprogs 0.5c

diff --git a/lib/ext2fs/expanddir.c b/lib/ext2fs/expanddir.c
index 5af9853..b2597c9 100644
--- a/lib/ext2fs/expanddir.c
+++ b/lib/ext2fs/expanddir.c
@@ -9,6 +9,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
 
 #include <linux/ext2_fs.h>
 
@@ -55,7 +58,7 @@
 		}
 		memset(block, 0, fs->blocksize);
 	}	
-	retval = io_channel_write_blk(fs->io, new_blk, 1, block);
+	retval = ext2fs_write_dir_block(fs, new_blk, block);
 	if (retval) {
 		es->err = retval;
 		return BLOCK_ABORT;