[pngpp] Fix strerror_r not found error on windows (#27079)

* Fix strerror_r not found error on windows

* Ran x-add-version command

* Update version database
This commit is contained in:
sidy3d 2022-10-05 18:37:32 -04:00 committed by GitHub
parent 955a842e86
commit 1ce72c533c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 2 deletions

View File

@ -0,0 +1,13 @@
diff --git a/error.hpp b/error.hpp
index 31e1801..d4b4655 100644
--- a/error.hpp
+++ b/error.hpp
@@ -32,7 +32,7 @@
#define PNGPP_ERROR_HPP_INCLUDED
/* check if we have strerror_s or strerror_r, prefer the former which is C11 std */
-#ifdef __STDC_LIB_EXT1__
+#if defined(__STDC_LIB_EXT1__) || defined(_WIN32)
#define __STDC_WANT_LIB_EXT1__ 1
#include <string.h>

View File

@ -8,6 +8,8 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
fix-stderror-win.patch
)
file(GLOB HEADER_FILES ${SOURCE_PATH}/*.hpp)

View File

@ -1,6 +1,7 @@
{
"name": "pngpp",
"version-string": "0.2.10",
"version": "0.2.10",
"port-version": 1,
"description": "A C++ wrapper for libpng library.",
"dependencies": [
"libpng"

View File

@ -5742,7 +5742,7 @@
},
"pngpp": {
"baseline": "0.2.10",
"port-version": 0
"port-version": 1
},
"pngwriter": {
"baseline": "0.7.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "088d8489ba3b0778d1612d59682ea0b6b3c2eb88",
"version": "0.2.10",
"port-version": 1
},
{
"git-tree": "4c162ef0d91f9415a77e44bd02f9bd3abf3684e1",
"version-string": "0.2.10",