#! /bin/sh /usr/share/dpatch/dpatch-run ## 99_kfbsd_fstat_patch.dpatch by Michael Stone ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ Index: b/lib/fstatat.c =================================================================== --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -132,4 +132,15 @@ stat_func (char const *name, struct stat # undef AT_FUNC_POST_FILE_PARAM_DECLS # undef AT_FUNC_POST_FILE_ARGS +#ifdef __FreeBSD_kernel__ + +int __fxstatat(int version, int fd, const char *file, struct stat *st, int flag) +{ + typedef int (*tp)(int, const char *, struct stat *, int); + volatile tp f = fstatat; + return f(fd, file, st, flag); +} + +#endif + #endif /* !HAVE_FSTATAT */