lseek takes an off_t, not a long
SCCS-vsn: lib/libc/db/recno/rec_close.c 5.4
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_close.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)rec_close.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
BTREE *t;
DBT data, key;
off_t off;
BTREE *t;
DBT data, key;
off_t off;
int status;
t = dbp->internal;
int status;
t = dbp->internal;
return (RET_ERROR);
/* Rewind the file descriptor. */
return (RET_ERROR);
/* Rewind the file descriptor. */
- if (lseek(t->bt_rfd, 0L, SEEK_SET) != 0L)
+ if (lseek(t->bt_rfd, (off_t)0, SEEK_SET) != 0L)
return (RET_ERROR);
iov[1].iov_base = "\n";
iov[1].iov_len = 1;
scursor = t->bt_rcursor;
return (RET_ERROR);
iov[1].iov_base = "\n";
iov[1].iov_len = 1;
scursor = t->bt_rcursor;
+ key.size = sizeof(recno_t);
+ key.data = &trec;
+
status = (dbp->seq)(dbp, &key, &data, R_FIRST);
while (status == RET_SUCCESS) {
iov[0].iov_base = data.data;
status = (dbp->seq)(dbp, &key, &data, R_FIRST);
while (status == RET_SUCCESS) {
iov[0].iov_base = data.data;
t->bt_rcursor = scursor;
if (status == RET_ERROR)
return (RET_ERROR);
t->bt_rcursor = scursor;
if (status == RET_ERROR)
return (RET_ERROR);
- if ((off = lseek(t->bt_rfd, 0L, SEEK_CUR)) == -1)
+ if ((off = lseek(t->bt_rfd, (off_t)0, SEEK_CUR)) == -1)
return (RET_ERROR);
if (ftruncate(t->bt_rfd, off))
return (RET_ERROR);
return (RET_ERROR);
if (ftruncate(t->bt_rfd, off))
return (RET_ERROR);