Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit f34eb90

Browse files
committed
fix preprocessor concatenation
1 parent 3c0ffb7 commit f34eb90

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 9c67ef92cb39f39a214f8c778de428235b9b4d54 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo.beauzee@datadoghq.com>
3+
Date: Fri, 24 Jan 2025 17:05:19 +0100
4+
Subject: [PATCH] fix preprocessor concatenation
5+
6+
---
7+
crypto/defaults.c | 6 +++---
8+
1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+
diff --git a/crypto/defaults.c b/crypto/defaults.c
11+
index 908539cf31..0a40954c52 100644
12+
--- a/crypto/defaults.c
13+
+++ b/crypto/defaults.c
14+
@@ -19,7 +19,7 @@
15+
# define MAKESTR(x) TOSTR(x)
16+
# define NOQUOTE(x) x
17+
# if defined(OSSL_WINCTX)
18+
-# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" ##"-"## MAKESTR(OPENSSL_VERSION_MAJOR) ##"."## MAKESTR(OPENSSL_VERSION_MINOR) ##"-"## MAKESTR(OSSL_WINCTX)
19+
+# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" "-" MAKESTR(OPENSSL_VERSION_MAJOR) "." MAKESTR(OPENSSL_VERSION_MINOR) "-" MAKESTR(OSSL_WINCTX)
20+
# endif
21+
22+
/**
23+
@@ -70,7 +70,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
24+
LSTATUS ret;
25+
DWORD index = 0;
26+
LPCTCH tempstr = NULL;
27+
-
28+
+
29+
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
30+
TEXT(REGISTRY_KEY), KEY_WOW64_32KEY,
31+
KEY_QUERY_VALUE, &hkey);
32+
@@ -97,7 +97,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
33+
goto out;
34+
35+
if (!WideCharToMultiByte(CP_UTF8, 0, tempstr, -1, dst, keysize,
36+
- NULL, NULL))
37+
+ NULL, NULL))
38+
goto out;
39+
40+
retval = dst;
41+
--
42+
2.34.1
43+

config/software/openssl3.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
relative_path "openssl-#{version}"
4343

4444
build do
45+
patch source: "0001-fix-preprocessor-concatenation.patch"
4546

4647
env = with_standard_compiler_flags(with_embedded_path)
4748
if windows?

0 commit comments

Comments
 (0)