summaryrefslogtreecommitdiff
path: root/debian/patches/99_kfbsd_fstat_patch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/99_kfbsd_fstat_patch.patch')
-rw-r--r--debian/patches/99_kfbsd_fstat_patch.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/99_kfbsd_fstat_patch.patch b/debian/patches/99_kfbsd_fstat_patch.patch
new file mode 100644
index 00000000..0c348ead
--- /dev/null
+++ b/debian/patches/99_kfbsd_fstat_patch.patch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99_kfbsd_fstat_patch.dpatch by Michael Stone <mstone@debian.org>
+##
+## 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 */