diff --git a/compat/mingw-posix.h b/compat/mingw-posix.h index aab91d76db..286ca24002 100644 --- a/compat/mingw-posix.h +++ b/compat/mingw-posix.h @@ -384,8 +384,6 @@ int mingw_fstat(int fd, struct stat *buf); #define lstat mingw_lstat -int mingw_utime(const char *file_name, const struct utimbuf *times); -#define utime mingw_utime int mingw_utimensat(int fd, const char *path, const struct timespec times[2], int flag); #define utimensat mingw_utimensat size_t mingw_strftime(char *s, size_t max, diff --git a/compat/mingw.c b/compat/mingw.c index d09a976191..e2ec44fdd2 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1480,22 +1480,6 @@ revert_attrs: return rc; } -int mingw_utime(const char *file_name, const struct utimbuf *times) -{ - struct timespec ts[2]; - struct timespec *tsp = NULL; - - if (times) { - ts[0].tv_sec = times->actime; - ts[0].tv_nsec = 0; - ts[1].tv_sec = times->modtime; - ts[1].tv_nsec = 0; - tsp = ts; - } - - return mingw_utimensat(AT_FDCWD, file_name, tsp, 0); -} - #undef strftime size_t mingw_strftime(char *s, size_t max, const char *format, const struct tm *tm) diff --git a/compat/posix.h b/compat/posix.h index 3cac1751aa..435ed90f56 100644 --- a/compat/posix.h +++ b/compat/posix.h @@ -123,7 +123,6 @@ #include #include #include -#include #include #if !defined(NO_POLL_H) #include diff --git a/compat/vcbuild/include/sys/utime.h b/compat/vcbuild/include/sys/utime.h deleted file mode 100644 index 582589c70a..0000000000 --- a/compat/vcbuild/include/sys/utime.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _UTIME_H_ -#define _UTIME_H_ -/* - * UTIME.H - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * - * The mingw-runtime package and its code is distributed in the hope that it - * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR - * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to - * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You are free to use this package and its code without limitation. - */ - -/* - * Structure used by _utime function. - */ -struct _utimbuf -{ - time_t actime; /* Access time */ - time_t modtime; /* Modification time */ -}; - -#ifndef _NO_OLDNAMES -/* NOTE: Must be the same as _utimbuf above. */ -struct utimbuf -{ - time_t actime; - time_t modtime; -}; -#endif /* Not _NO_OLDNAMES */ - -#endif diff --git a/compat/vcbuild/include/utime.h b/compat/vcbuild/include/utime.h deleted file mode 100644 index 8285f38fde..0000000000 --- a/compat/vcbuild/include/utime.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/t/helper/test-chmtime.c b/t/helper/test-chmtime.c index a9e6eb78b8..295f55cf47 100644 --- a/t/helper/test-chmtime.c +++ b/t/helper/test-chmtime.c @@ -38,7 +38,6 @@ */ #include "test-tool.h" #include "git-compat-util.h" -#include static const char usage_str[] = "(-v|--verbose|-g|--get) (+|=|=+|=-|-) ..."; diff --git a/t/t4051/includes.c b/t/t4051/includes.c index efc68f8bf6..4861f6657b 100644 --- a/t/t4051/includes.c +++ b/t/t4051/includes.c @@ -15,6 +15,5 @@ #include #include #include -#include #include #include