patch 8.2.0711: temp directory might be cleared
Problem: With a long running Vim the temp directory might be cleared on
some systems.
Solution: Lock the temp directory. (closes #6044)
diff --git a/src/globals.h b/src/globals.h
index 9180bef..5dfb6ff 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -758,6 +758,9 @@
EXTERN int sc_col; // column for shown command
#ifdef TEMPDIRNAMES
+# if defined(UNIX) && defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+EXTERN DIR *vim_tempdir_dp INIT(= NULL); // File descriptor of temp dir
+# endif
EXTERN char_u *vim_tempdir INIT(= NULL); // Name of Vim's own temp dir.
// Ends in a slash.
#endif