mirror of https://github.com/microsoft/vcpkg.git
[supernovas]: patch for incorrect use of `gmtime_s()` (#52623)
This commit is contained in:
parent
6bb60cd358
commit
4d3d83e108
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/src/c99/iers.c b/src/c99/iers.c
|
||||
index dbbae395..b27da1a6 100644
|
||||
--- a/src/c99/iers.c
|
||||
+++ b/src/c99/iers.c
|
||||
@@ -64,7 +64,6 @@
|
||||
# define NTP_UNIX_EPOCH 2208988800LL ///< [s] NTP timestamp of UNIX epoch (1970 Jan 1)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
-# define gmtime_r gmtime_s ///< MSC equivalent
|
||||
# define strtok_r strtok_s ///< MSVC equivalent
|
||||
#endif
|
||||
|
||||
@@ -823,7 +822,11 @@ int novas_lookup_leap(time_t t) {
|
||||
struct tm tm = {};
|
||||
char str[40] = {'\0'};
|
||||
unlock_leap();
|
||||
+#ifdef _MSC_VER
|
||||
+ gmtime_s(&tm, &t);
|
||||
+#else
|
||||
gmtime_r(&t, &tm);
|
||||
+#endif
|
||||
strftime(str, sizeof(str), "%c", &tm);
|
||||
return novas_error(NOVAS_INVALID_LEAP, ERANGE, fn, "Time %s is beyond the leap seconds coverage range", str);
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ vcpkg_from_github(
|
|||
REF "v${VERSION}"
|
||||
SHA512 ae74ec6969c2902c53e5f1cc9bf66f41e97a838c7c0c0e6167a3f24050676a22f9ebd67f0b90a11105790b45166e3d1e79a4e9e264ccf68d4fb330785090f409
|
||||
HEAD_REF main
|
||||
PATCHES pkgconfig.patch
|
||||
PATCHES pkgconfig.patch gmtime_s.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "supernovas",
|
||||
"version": "1.7.1",
|
||||
"port-version": 1,
|
||||
"description": "SuperNOVAS C/C++ high-precision astrometry library",
|
||||
"homepage": "https://sigmyne.github.io/SuperNOVAS/",
|
||||
"documentation": "https://sigmyne.github.io/SuperNOVAS/doc/html/",
|
||||
|
|
|
|||
|
|
@ -9926,7 +9926,7 @@
|
|||
},
|
||||
"supernovas": {
|
||||
"baseline": "1.7.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"sushant-wayal-stringhash": {
|
||||
"baseline": "1.1.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1871128734a57b5da9f3684eeba0895656715872",
|
||||
"version": "1.7.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "6f619d894812ada8b3fd6199e1f71dce48c8bedf",
|
||||
"version": "1.7.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue