diff options
author | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
commit | f0de78bd4f29fa688c5df116f3f9cd43543a76d0 (patch) | |
tree | 856b0dee3f2764c13a32dad5ffe2424fab7fef41 /openbsd-compat/bsd-misc.h | |
parent | 4213eec74e74de6310c27a40c3e9759a08a73996 (diff) | |
parent | 8aa3455b16fddea4c0144a7c4a1edb10ec67dcc8 (diff) |
Import openssh_8.2p1.orig.tar.gz
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r-- | openbsd-compat/bsd-misc.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index cb158cd5c..3a7dd6f4c 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h | |||
@@ -64,14 +64,6 @@ struct timeval { | |||
64 | int utimes(char *, struct timeval *); | 64 | int utimes(char *, struct timeval *); |
65 | #endif /* HAVE_UTIMES */ | 65 | #endif /* HAVE_UTIMES */ |
66 | 66 | ||
67 | #ifndef HAVE_UTIMENSAT | ||
68 | /* start with the high bits and work down to minimise risk of overlap */ | ||
69 | # ifndef AT_SYMLINK_NOFOLLOW | ||
70 | # define AT_SYMLINK_NOFOLLOW 0x80000000 | ||
71 | # endif | ||
72 | int utimensat(int, const char *, const struct timespec[2], int); | ||
73 | #endif | ||
74 | |||
75 | #ifndef AT_FDCWD | 67 | #ifndef AT_FDCWD |
76 | # define AT_FDCWD (-2) | 68 | # define AT_FDCWD (-2) |
77 | #endif | 69 | #endif |
@@ -88,16 +80,27 @@ int fchownat(int, const char *, uid_t, gid_t, int); | |||
88 | int truncate (const char *, off_t); | 80 | int truncate (const char *, off_t); |
89 | #endif /* HAVE_TRUNCATE */ | 81 | #endif /* HAVE_TRUNCATE */ |
90 | 82 | ||
91 | #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) | ||
92 | #ifndef HAVE_STRUCT_TIMESPEC | 83 | #ifndef HAVE_STRUCT_TIMESPEC |
93 | struct timespec { | 84 | struct timespec { |
94 | time_t tv_sec; | 85 | time_t tv_sec; |
95 | long tv_nsec; | 86 | long tv_nsec; |
96 | }; | 87 | }; |
97 | #endif | 88 | #endif /* !HAVE_STRUCT_TIMESPEC */ |
89 | |||
90 | #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) | ||
91 | # include <time.h> | ||
98 | int nanosleep(const struct timespec *, struct timespec *); | 92 | int nanosleep(const struct timespec *, struct timespec *); |
99 | #endif | 93 | #endif |
100 | 94 | ||
95 | #ifndef HAVE_UTIMENSAT | ||
96 | # include <time.h> | ||
97 | /* start with the high bits and work down to minimise risk of overlap */ | ||
98 | # ifndef AT_SYMLINK_NOFOLLOW | ||
99 | # define AT_SYMLINK_NOFOLLOW 0x80000000 | ||
100 | # endif | ||
101 | int utimensat(int, const char *, const struct timespec[2], int); | ||
102 | #endif /* !HAVE_UTIMENSAT */ | ||
103 | |||
101 | #ifndef HAVE_USLEEP | 104 | #ifndef HAVE_USLEEP |
102 | int usleep(unsigned int useconds); | 105 | int usleep(unsigned int useconds); |
103 | #endif | 106 | #endif |
@@ -177,4 +180,12 @@ int flock(int, int); | |||
177 | # define fflush(x) (_ssh_compat_fflush(x)) | 180 | # define fflush(x) (_ssh_compat_fflush(x)) |
178 | #endif | 181 | #endif |
179 | 182 | ||
183 | #ifndef HAVE_LOCALTIME_R | ||
184 | struct tm *localtime_r(const time_t *, struct tm *); | ||
185 | #endif | ||
186 | |||
187 | #ifndef HAVE_REALPATH | ||
188 | #define realpath(x, y) (sftp_realpath((x), (y))) | ||
189 | #endif | ||
190 | |||
180 | #endif /* _BSD_MISC_H */ | 191 | #endif /* _BSD_MISC_H */ |