[gklib] Fix mingw build (#26468)

* Fix mingw build

* Update versions
This commit is contained in:
Kai Pastor 2022-08-23 19:37:35 +02:00 committed by GitHub
parent d044f52707
commit 5cae88e33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,32 @@
diff --git a/gk_arch.h b/gk_arch.h
index 122e087..c8a322f 100644
--- a/gk_arch.h
+++ b/gk_arch.h
@@ -42,7 +42,9 @@
#endif
#include <inttypes.h>
#include <sys/types.h>
+#ifndef _WIN32 # MinGW
#include <sys/resource.h>
+#endif
#include <sys/time.h>
#include <unistd.h>
#endif
diff --git a/gk_getopt.h b/gk_getopt.h
index 4bb8611..cc416ab 100644
--- a/gk_getopt.h
+++ b/gk_getopt.h
@@ -52,10 +52,10 @@ struct gk_option {
/* Function prototypes */
-extern int gk_getopt(int __argc, char **__argv, char *__shortopts);
-extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts,
+extern int gk_getopt(int argc, char ** argv, char *__shortopts);
+extern int gk_getopt_long(int argc, char ** argv, char *__shortopts,
struct gk_option *__longopts, int *__longind);
-extern int gk_getopt_long_only (int __argc, char **__argv,
+extern int gk_getopt_long_only (int argc, char ** argv,
char *__shortopts, struct gk_option *__longopts, int *__longind);

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
SHA512 e906c7af8b40ce1c4c4ea43cbfca3e3970e5595686333ac9ac80c6cbc558feb0e833f530f034161927030edac5272234c6ac9cad5287cb6edab0c0671ba3644c
PATCHES
build-fixes.patch
fix-mingw.patch
)
# Delete files that are workarounds for very old copies of msvc.

View File

@ -1,7 +1,7 @@
{
"name": "gklib",
"version-date": "2022-07-27",
"port-version": 1,
"port-version": 2,
"description": "General helper libraries for KarypisLab.",
"homepage": "https://github.com/KarypisLab/GKlib/",
"license": "Apache-2.0",

View File

@ -2566,7 +2566,7 @@
},
"gklib": {
"baseline": "2022-07-27",
"port-version": 1
"port-version": 2
},
"gl2ps": {
"baseline": "1.4.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f9c6f0e711860da19899fbe78e027d0a5e8cfc1",
"version-date": "2022-07-27",
"port-version": 2
},
{
"git-tree": "be7b5aca0025910c7dbbc260564bf7d56ada1a3c",
"version-date": "2022-07-27",