From: Martin Mares Date: Fri, 22 Aug 2008 17:10:06 +0000 (+0200) Subject: We do not care about ancient C libraries any more. X-Git-Tag: python-dummy-working~147 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5a2ed5a6f42e6dba2cfaccf398d9c41c0795eaef;p=moe.git We do not care about ancient C libraries any more. --- 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");