http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45841
--- Comment #27 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2010-10-05 18:59:00 UTC --- (In reply to comment #26) > looks like I have to amend > the check_v3_target_fileio some more and fix another simulator bug. Film at > 11. JFTR, the simulator part (the wrap function records errno for passing on to the target): --- sim/common/callback.c.orig Wed Jan 14 12:09:55 2009 +++ sim/common/callback.c Tue Oct 5 20:56:21 2010 @@ -278,7 +278,7 @@ os_lseek (p, fd, off, way) result = fdbad (p, fd); if (result) return result; - result = lseek (fdmap (p, fd), off, way); + result = wrap (p, lseek (fdmap (p, fd), off, way)); return result; }