X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=box%2Fbox.c;h=efbdc31148406a82acdf23ee5dfb68e103d56712;hb=5a2ed5a6f42e6dba2cfaccf398d9c41c0795eaef;hp=09fb0331b35e4c7a6ece1e203c2143de681063e0;hpb=5a3865e59413cd51b7d55cbbfcf383c933ecb885;p=eval.git diff --git a/box/box.c b/box/box.c index 09fb033..efbdc31 100644 --- a/box/box.c +++ b/box/box.c @@ -47,15 +47,6 @@ static int ticks_per_sec; static int exec_seen; static int partial_line; -#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0 -/* glibc 2.1 or newer -> has lseek64 */ -#define long_seek(f,o,w) lseek64(f,o,w) -#else -/* Touching clandestine places in glibc */ -extern loff_t llseek(int fd, loff_t pos, int whence); -#define long_seek(f,o,w) llseek(f,o,w) -#endif - static void die(char *msg, ...) NONRET; /*** Meta-files ***/ @@ -599,8 +590,8 @@ valid_filename(unsigned long addr) l = remains; if (!l) err("Access to file with name too long"); - if (long_seek(mem_fd, addr, SEEK_SET) < 0) - die("long_seek(mem): %m"); + if (lseek64(mem_fd, addr, SEEK_SET) < 0) + die("lseek64(mem): %m"); remains = read(mem_fd, end, l); if (remains < 0) die("read(mem): %m");