diff options
| author | christos <christos@NetBSD.org> | 1997-10-08 04:12:34 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1997-10-08 04:12:34 +0000 |
| commit | 93bfa94d10d8e7391ddc21ca3ed28a83c6c3ceff (patch) | |
| tree | 0fab0399bf5db461a769549ed97f831d2d83a209 /lib/libpthread/stdio | |
| parent | 8212c7a24112ad60c90307cf774af4e7f1a49e2a (diff) | |
How did this ever work? Fix to pass fileno(fp), instead of fp to lseek.
Pass off_t instead of fpos_t as the second argument.
Diffstat (limited to 'lib/libpthread/stdio')
| -rw-r--r-- | lib/libpthread/stdio/ftell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/stdio/ftell.c b/lib/libpthread/stdio/ftell.c index bc3e2e41bab..e89a90e730d 100644 --- a/lib/libpthread/stdio/ftell.c +++ b/lib/libpthread/stdio/ftell.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)ftell.c 5.4 (Berkeley) 2/5/91";*/ -static char *rcsid = "$Id: ftell.c,v 1.1 1994/02/07 22:06:01 proven Exp $"; +static char *rcsid = "$Id: ftell.c,v 1.2 1997/10/08 04:12:34 christos Exp $"; #endif /* LIBC_SCCS and not lint */ #include <pthread.h> @@ -62,7 +62,7 @@ ftell(fp) if (fp->_flags & __SOFF) pos = fp->_offset; else { - pos = lseek(fp, (fpos_t)0, SEEK_CUR); + pos = lseek(fileno(fp), (off_t)0, SEEK_CUR); } if (pos != -1L) { |
