# HG changeset patch # User Pascal Bellard # Date 1362387834 -3600 # Node ID ab3f0098073a49f5aeaea7d5e430de58c3ef27b5 # Parent a26ba54f3ea718ddcf97331a23a6b2050faa02e6 syslinux/isohybrid.exe: lseek fix diff -r a26ba54f3ea7 -r ab3f0098073a syslinux/stuff/iso2exe/iso2exe.c --- a/syslinux/stuff/iso2exe/iso2exe.c Mon Mar 04 09:52:12 2013 +0100 +++ b/syslinux/stuff/iso2exe/iso2exe.c Mon Mar 04 10:03:54 2013 +0100 @@ -57,7 +57,7 @@ * (unsigned long *) &bootiso[512 + 440] = rand(); * (unsigned long *) &bootiso[512 + partition] = 0x10080; * (unsigned short *) &bootiso[512 + 510] = 0xAA55; - size = lseek(fd, 0, SEEK_END); + size = lseek(fd, 0UL, SEEK_END); cylinders = (size + trksz - 1) / trksz; bootiso[512 + partition + 4] = 23; // "Windows hidden IFS" bootiso[512 + partition + 5] = heads - 1; @@ -71,13 +71,13 @@ * (unsigned short *) (bootiso + 26) = rand(); // Update iso image - lseek(fd, 0, SEEK_SET); + lseek(fd, 0UL, SEEK_SET); write(fd, bootiso, 1024); - lseek(fd, 0x8400 - BOOTISOSZ, SEEK_SET); + lseek(fd, 0x8400UL - BOOTISOSZ, SEEK_SET); write(fd, bootiso + 1024, BOOTISOSZ - 1024); // Compute the checksum - lseek(fd, 0, SEEK_SET); + lseek(fd, 0UL, SEEK_SET); for (i = 66, n = 0, j = 0; j < 16; j++, i = 0) { if (read(fd, buffer, sizeof(buffer)) != sizeof(buffer)) goto nochksum; @@ -85,7 +85,7 @@ n += * (unsigned short *) (buffer + i); } * (unsigned short *) (bootiso + 64) = -n; - lseek(fd, 0, SEEK_SET); + lseek(fd, 0UL, SEEK_SET); write(fd, bootiso, 512); nochksum: close(fd);