linamh/sys-fs/tux3progs/files/tux3-gcc44-1.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-05-17
Initial Package Version: changeset cb5655728089
Origin: hirofumi
Upstream Status: accepted
Description: fix gcc 4.4 build
diff -Naur tux3.orig/user/buffer.c tux3/user/buffer.c
--- tux3.orig/user/buffer.c 2009-05-17 20:13:43.440868934 +0000
+++ tux3/user/buffer.c 2009-05-17 19:19:25.410186739 +0000
@@ -475,7 +475,7 @@
data_allocation_failure:
warn("Error: %s unable to allocate space for buffer data", strerror(err));
- free(buffers);
+ free(prealloc_heads);
buffers_allocation_failure:
warn("Unable to pre-allocate buffers. Using on demand allocation for buffers");
return err;
diff -Naur tux3.orig/user/xattr.c tux3/user/xattr.c
--- tux3.orig/user/xattr.c 2009-05-17 20:08:53.673031004 +0000
+++ tux3/user/xattr.c 2009-05-17 20:54:32.426118888 +0000
@@ -28,7 +28,7 @@
{
unsigned abits = DATA_BTREE_BIT|CTIME_SIZE_BIT|MODE_OWNER_BIT|LINK_COUNT_BIT|MTIME_BIT;
struct dev *dev = &(struct dev){ .bits = 8, .fd = open(argv[1], O_CREAT|O_RDWR, S_IRWXU) };
- ftruncate(dev->fd, 1 << 24);
+ assert(!ftruncate(dev->fd, 1 << 24));
init_buffers(dev, 1 << 20, 0);
struct sb *sb = rapid_sb(dev,
.version = 0,