Module Name: src Committed By: pooka Date: Mon Feb 21 12:55:21 UTC 2011
Modified Files: src/lib/librumphijack: hijack.c Log Message: Actually, we need both lseek and _lseek so that out-of-libc references go to the right place instead of directly to __lseek. Seeking in mplayer works now. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.60 src/lib/librumphijack/hijack.c:1.61 --- src/lib/librumphijack/hijack.c:1.60 Mon Feb 21 12:51:06 2011 +++ src/lib/librumphijack/hijack.c Mon Feb 21 12:55:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.60 2011/02/21 12:51:06 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.61 2011/02/21 12:55:21 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: hijack.c,v 1.60 2011/02/21 12:51:06 pooka Exp $"); +__RCSID("$NetBSD: hijack.c,v 1.61 2011/02/21 12:55:21 pooka Exp $"); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -125,7 +125,6 @@ #define REALPWRITE _sys_pwrite #define REALGETDENTS __getdents30 #define REALMOUNT __mount50 -#define REALLSEEK _lseek int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *); int REALPOLLTS(struct pollfd *, nfds_t, @@ -143,7 +142,6 @@ int REALLUTIMES(const char *, const struct timeval [2]); int REALFUTIMES(int, const struct timeval [2]); int REALMOUNT(const char *, const char *, int, void *, size_t); -off_t REALLSEEK(int, off_t, int); int __getcwd(char *, size_t); #define S(a) __STRING(a) @@ -197,7 +195,7 @@ { DUALCALL_FSTATVFS1, "fstatvfs1", RSYS_NAME(FSTATVFS1) }, { DUALCALL_CHDIR, "chdir", RSYS_NAME(CHDIR) }, { DUALCALL_FCHDIR, "fchdir", RSYS_NAME(FCHDIR) }, - { DUALCALL_LSEEK, S(REALLSEEK), RSYS_NAME(LSEEK) }, + { DUALCALL_LSEEK, "lseek", RSYS_NAME(LSEEK) }, { DUALCALL_GETDENTS, "__getdents30", RSYS_NAME(GETDENTS) }, { DUALCALL_UNLINK, "unlink", RSYS_NAME(UNLINK) }, { DUALCALL_SYMLINK, "symlink", RSYS_NAME(SYMLINK) }, @@ -1661,10 +1659,11 @@ (int, struct statvfs *, int), \ (fd, buf, flags)) -FDCALL(off_t, REALLSEEK, DUALCALL_LSEEK, \ +FDCALL(off_t, lseek, DUALCALL_LSEEK, \ (int fd, off_t offset, int whence), \ (int, off_t, int), \ (fd, offset, whence)) +__strong_alias(_lseek,lseek); FDCALL(int, REALGETDENTS, DUALCALL_GETDENTS, \ (int fd, char *buf, size_t nbytes), \