jobextra/p7zip/oemcp-cygwin.patch
2023-10-26 22:03:22 +03:00

30 lines
930 B
Diff

From 0e0a1a8316b691de8f1eca8e9520274e00205884 Mon Sep 17 00:00:00 2001
From: hanjinfei <hWX701289@china.huawei.com>
Date: Wed, 22 Jul 2020 03:05:53 +0100
Subject: [PATCH] fix Compilation error on cygwin.
---
CPP/7zip/Archive/Zip/ZipItem.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp
index 7e11b197..37b69933 100644
--- a/CPP/7zip/Archive/Zip/ZipItem.cpp
+++ b/CPP/7zip/Archive/Zip/ZipItem.cpp
@@ -1,6 +1,6 @@
// Archive/ZipItem.cpp
-#ifndef _WIN32
+#if (!defined _WIN32) && (!defined __CYGWIN__)
#include <iconv.h>
#include <locale.h>
#endif
@@ -355,7 +355,7 @@ void CItem::GetUnicodeString(UString &res, const AString &s, bool isComment, boo
#endif
}
- #ifndef _WIN32
+ #if (!defined _WIN32) && (!defined __CYGWIN__)
// Convert OEM char set to UTF-8 if needed
// Use system locale to select code page