-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
patches/make/make-4.3_undef-HAVE_STRUCT_DIRENT_D_TYPE.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/src/config.h.W32 | ||
+++ b/src/config.h.W32 | ||
@@ -348,7 +348,7 @@ | ||
/* Define to 1 if `d_type' is a member of `struct dirent'. */ | ||
/* SV 57152: MinGW64 version of dirent doesn't support d_type. */ | ||
-#ifndef __MINGW64__ | ||
+#ifndef __MINGW32__ | ||
# define HAVE_STRUCT_DIRENT_D_TYPE 1 | ||
#endif | ||
|
||
/* Define to 1 if 'n_un.n_name' is a member of 'struct nlist'. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 1f542f915d6a3f8a69a4acae94b01185df7ee2a6 Mon Sep 17 00:00:00 2001 | ||
From: Orgad Shaneh <[email protected]> | ||
Date: Wed, 2 Nov 2022 18:23:57 +0200 | ||
Subject: [PATCH] Fix reading file timestamp as 64-bit on MinGW32 | ||
|
||
Commit 01142a53c9d (Add support for intmax_t) added support for 64-bit | ||
time_t by defining __MINGW_USE_VC2005_COMPAT. But this only works with | ||
_stat64 as expected. When stat is used on 32-bit systems, it returns a | ||
bad timestamp (for example, 72586185920376753). | ||
|
||
This triggers the following errors every time make is executed: | ||
mingw32-make: Warning: File 'Makefile' has modification time 7.3e+16 s in the future | ||
mingw32-make: warning: Clock skew detected. Your build may be incomplete. | ||
|
||
and of course, dependencies are completely broken. | ||
|
||
Fix by enabling _stat64 also for MinGW. | ||
--- | ||
src/remake.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/remake.c b/src/remake.c | ||
index 4ce3d2a3..83b0b79d 100644 | ||
--- a/src/remake.c | ||
+++ b/src/remake.c | ||
@@ -37,7 +37,7 @@ | ||
#include <windows.h> | ||
#include <io.h> | ||
#include <sys/stat.h> | ||
-#if defined(_MSC_VER) && _MSC_VER > 1200 | ||
+#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER > 1200) | ||
/* VC7 or later supports _stat64 to access 64-bit file size. */ | ||
#define STAT _stat64 | ||
#else | ||
-- | ||
2.38.1.windows.1.1.gfa087c7d8f | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- make.orig/main.c | ||
+++ make/main.c | ||
--- make.orig/src/main.c | ||
+++ make/src/main.c | ||
@@ -971,8 +971,11 @@ | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters