Skip to content

Commit

Permalink
test 15307 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 16, 2024
1 parent 7d8499b commit 7a4ba8d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions curl.test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/src/mk-file-embed.pl b/src/mk-file-embed.pl
index 3447aa9472b717..505ecb6417c9b1 100755
--- a/src/mk-file-embed.pl
+++ b/src/mk-file-embed.pl
@@ -29,11 +29,16 @@
$varname = shift @ARGV;
}

+my $varname_upper = uc($varnam);
+
print <<HEAD
/*
* NEVER EVER edit this manually, fix the mk-file-embed.pl script instead!
*/
+#ifndef CURL_DECLARED_${varname_upper}
+#define CURL_DECLARED_${varname_upper}
extern const unsigned char ${varname}[];
+#endif
const unsigned char ${varname}[] = {
HEAD
;
diff --git a/src/tool_operate.c b/src/tool_operate.c
index ed5ab4d6c86c57..5aadf26d23f6e9 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -105,8 +105,11 @@ CURL_EXTERN CURLcode curl_easy_perform_ev(CURL *easy);
#include "memdebug.h" /* keep this as LAST include */

#ifdef CURL_CA_EMBED
+#ifndef CURL_DECLARED_CURL_CA_EMBED
+#define CURL_DECLARED_CURL_CA_EMBED
extern const unsigned char curl_ca_embed[];
#endif
+#endif

#ifndef O_BINARY
/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in

0 comments on commit 7a4ba8d

Please sign in to comment.