OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | Index: emacs-23.2/src/unexelf.c |
| 2 | =================================================================== |
| 3 | --- emacs-23.2.orig/src/unexelf.c 2011-06-26 09:58:31.000000000 +0200 |
| 4 | +++ emacs-23.2/src/unexelf.c 2011-06-26 10:00:40.000000000 +0200 |
| 5 | @@ -827,7 +827,9 @@ |
| 6 | |
| 7 | new_file_size = stat_buf.st_size + old_file_h->e_shentsize + new_data2_incr; |
| 8 | |
| 9 | - if (ftruncate (new_file, new_file_size)) |
| 10 | + /* this gives an error code when run via Qemu userspace emulation, |
| 11 | + just ignoring the result code seems to fix the problem. */ |
| 12 | + if (ftruncate (new_file, new_file_size) && 0) |
| 13 | fatal ("Can't ftruncate (%s): errno %d\n", new_name, errno); |
| 14 | |
| 15 | new_base = mmap (NULL, new_file_size, PROT_READ | PROT_WRITE, |
| 16 |
