diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-27 06:44:32 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-27 06:44:32 +0000 | 
| commit | a3604b95ed1b025e84c6b948b9939cf63fc9f9ce (patch) | |
| tree | 6998e1bc3c80f5ac90fcd7497da4a1d547a8452e /lib/libc/sys/stat.c | |
| parent | edd7eaddc8e5730ca33436568f6fcb8409984d13 (diff) | |
| parent | f21680fd983784341c88dbe1015548f65c79868d (diff) | |
Notes
Diffstat (limited to 'lib/libc/sys/stat.c')
| -rw-r--r-- | lib/libc/sys/stat.c | 14 | 
1 files changed, 11 insertions, 3 deletions
| diff --git a/lib/libc/sys/stat.c b/lib/libc/sys/stat.c index 6b58daa9e515..a7ed7baf5c2f 100644 --- a/lib/libc/sys/stat.c +++ b/lib/libc/sys/stat.c @@ -1,4 +1,5 @@  /*- + * Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>   * Copyright (c) 2012 Gleb Kurtsou <gleb@FreeBSD.org>   * All rights reserved.   * @@ -29,15 +30,22 @@ __FBSDID("$FreeBSD$");  #include "namespace.h"  #include <sys/param.h> -#include <sys/fcntl.h>  #include <sys/syscall.h> -#include <sys/stat.h> +#include "compat-ino64.h"  #include <unistd.h> +  #include "libc_private.h"  int  stat(const char *path, struct stat *sb)  { +	struct freebsd11_stat stat11; +	int rv; -	return (__sys_fstatat(AT_FDCWD, path, sb, 0)); +	if (__getosreldate() >= INO64_FIRST) +		return (__sys_fstatat(AT_FDCWD, path, sb, 0)); +	rv = syscall(SYS_freebsd11_stat, path, &stat11); +	if (rv == 0) +		__stat11_to_stat(&stat11, sb); +	return (rv);  } | 
