Adjust for the fhstat() compat kernel change.
This commit is contained in:
parent
fc716ffaeb
commit
99f76ec337
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat___stat13.c,v 1.1 2005/09/13 01:44:09 christos Exp $ */
|
||||
/* $NetBSD: compat___stat13.c,v 1.2 2006/05/04 19:00:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Frank van der Linden
|
||||
|
@ -33,14 +33,17 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: compat___stat13.c,v 1.1 2005/09/13 01:44:09 christos Exp $");
|
||||
__RCSID("$NetBSD: compat___stat13.c,v 1.2 2006/05/04 19:00:18 christos Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#define __LIBC12_SOURCE__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mount.h>
|
||||
#include <compat/sys/stat.h>
|
||||
#include <compat/sys/mount.h>
|
||||
|
||||
__warn_references(__stat13,
|
||||
"warning: reference to compatibility __stat13(); include <sys/stat.h> to generate correct reference")
|
||||
|
@ -51,6 +54,10 @@ __warn_references(__fstat13,
|
|||
__warn_references(__lstat13,
|
||||
"warning: reference to compatibility __lstat13(); include <sys/stat.h> to generate correct reference")
|
||||
|
||||
__warn_references(fhstat,
|
||||
"warning: reference to compatibility fhstat(); include <sys/mount.h> to generate correct reference")
|
||||
|
||||
|
||||
/*
|
||||
* Convert from a new to an old stat structure.
|
||||
*/
|
||||
|
@ -114,3 +121,15 @@ __lstat13(const char *file, struct stat13 *ost)
|
|||
cvtstat(ost, &nst);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
fhstat(const fhandle_t *fh, struct stat13 *ost)
|
||||
{
|
||||
struct stat nst;
|
||||
int ret;
|
||||
|
||||
if ((ret = __fhstat30(fh, &nst)) == -1)
|
||||
return ret;
|
||||
cvtstat(ost, &nst);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.164 2006/03/11 21:07:18 christos Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.165 2006/05/04 19:00:18 christos Exp $
|
||||
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
|
||||
|
||||
# sys sources
|
||||
|
@ -53,7 +53,7 @@ ASM= access.S acct.S \
|
|||
extattr_list_link.S extattr_set_fd.S extattr_set_file.S \
|
||||
extattr_set_link.S \
|
||||
fchdir.S fchflags.S fchmod.S fchown.S fchroot.S \
|
||||
fhopen.S fhstat.S fhstatvfs1.S fktrace.S \
|
||||
fhopen.S __fhstat30.S fhstatvfs1.S fktrace.S \
|
||||
flock.S fpathconf.S __fstat30.S fstatvfs1.S futimes.S \
|
||||
__getcwd.S __getdents30.S getfh.S getvfsstat.S getgroups.S getitimer.S \
|
||||
__getlogin.S getpeername.S getpgid.S getpgrp.S \
|
||||
|
|
Loading…
Reference in New Issue