[openssh-commits] [openssh] 03/06: Move utimensat definition into timespec section.

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Oct 28 19:03:00 AEDT 2019


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 7169e31121e8c8cc729b55154deb722ae495b316
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Mon Oct 28 16:00:45 2019 +1100

    Move utimensat definition into timespec section.
    
    Since utimensat uses struct timespec, move it to the section where we
    define struct timespec when needed.
---
 openbsd-compat/bsd-misc.h | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index cb158cd5..23c18d67 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -64,14 +64,6 @@ struct timeval {
 int utimes(char *, struct timeval *);
 #endif /* HAVE_UTIMES */
 
-#ifndef HAVE_UTIMENSAT
-/* start with the high bits and work down to minimise risk of overlap */
-# ifndef AT_SYMLINK_NOFOLLOW
-#  define AT_SYMLINK_NOFOLLOW 0x80000000
-# endif
-int utimensat(int, const char *, const struct timespec[2], int);
-#endif
-
 #ifndef AT_FDCWD
 # define AT_FDCWD (-2)
 #endif
@@ -88,16 +80,26 @@ int fchownat(int, const char *, uid_t, gid_t, int);
 int truncate (const char *, off_t);
 #endif /* HAVE_TRUNCATE */
 
-#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
 #ifndef HAVE_STRUCT_TIMESPEC
 struct timespec {
 	time_t	tv_sec;
 	long	tv_nsec;
 };
-#endif
+
+#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
 int nanosleep(const struct timespec *, struct timespec *);
 #endif
 
+#ifndef HAVE_UTIMENSAT
+/* start with the high bits and work down to minimise risk of overlap */
+# ifndef AT_SYMLINK_NOFOLLOW
+#  define AT_SYMLINK_NOFOLLOW 0x80000000
+# endif
+int utimensat(int, const char *, const struct timespec[2], int);
+#endif /* !HAVE_UTIMENSAT */
+
+#endif /* !HAVE_STRUCT_TIMESPEC */
+
 #ifndef HAVE_USLEEP
 int usleep(unsigned int useconds);
 #endif

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list