aboutsummaryrefslogtreecommitdiff
path: root/patches/cms.h.patch
diff options
context:
space:
mode:
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>2026-02-20 17:07:36 +0900
committerKenjiro Nakayama <nakayamakenjiro@gmail.com>2026-02-20 17:22:15 +0900
commit10fd3d1868f5d8e7e282aba2be99ec0cf75431e4 (patch)
tree0616879d39567e9c6bcf098fa99b72d005cdcc2d /patches/cms.h.patch
parent2fa8b0da90a99d04ec9d12b932a824056bd321d3 (diff)
downloadportable-10fd3d1868f5d8e7e282aba2be99ec0cf75431e4.tar.gz
portable-10fd3d1868f5d8e7e282aba2be99ec0cf75431e4.tar.bz2
portable-10fd3d1868f5d8e7e282aba2be99ec0cf75431e4.zip
Add definition of ssize_t to cms.h for Windows
MSVC does not define ssize_t. Hence, this patch adds a typedef for compatibility when LIBRESSL_INTERNAL is not defined. Fix https://github.com/libressl/portable/issues/1232
Diffstat (limited to 'patches/cms.h.patch')
-rw-r--r--patches/cms.h.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/patches/cms.h.patch b/patches/cms.h.patch
new file mode 100644
index 0000000..5d403cd
--- /dev/null
+++ b/patches/cms.h.patch
@@ -0,0 +1,16 @@
1--- include/openssl/cms.h.orig 2026-02-20 16:35:58
2+++ include/openssl/cms.h 2026-02-20 16:36:09
3@@ -67,6 +67,13 @@
4 extern "C" {
5 #endif
6
7+#ifdef _MSC_VER
8+#ifndef LIBRESSL_INTERNAL
9+#include <basetsd.h>
10+typedef SSIZE_T ssize_t;
11+#endif
12+#endif
13+
14 typedef struct CMS_ContentInfo_st CMS_ContentInfo;
15 typedef struct CMS_SignerInfo_st CMS_SignerInfo;
16 typedef struct CMS_CertificateChoices CMS_CertificateChoices;