Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumphijack Actually, we need both lseek and _lseek so...



details:   https://anonhg.NetBSD.org/src/rev/4f4870663571
branches:  trunk
changeset: 762468:4f4870663571
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Feb 21 12:55:21 2011 +0000

description:
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.

diffstat:

 lib/librumphijack/hijack.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 1525a431b50e -r 4f4870663571 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Mon Feb 21 12:51:06 2011 +0000
+++ b/lib/librumphijack/hijack.c        Mon Feb 21 12:55:21 2011 +0000
@@ -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),                             \



Home | Main Index | Thread Index | Old Index