]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/freeimage/use-external-png-zlib.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / freeimage / use-external-png-zlib.patch
CommitLineData
1e59de90
TL
1diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp
2index ba2ef17..c3c5cd6 100644
3--- a/Source/FreeImage/PluginPNG.cpp
4+++ b/Source/FreeImage/PluginPNG.cpp
5@@ -40,8 +40,8 @@
6
7 // ----------------------------------------------------------
8
9-#include "../ZLib/zlib.h"
10-#include "../LibPNG/png.h"
11+#include <zlib.h>
12+#include <libpng16/png.h>
13
14 // ----------------------------------------------------------
15
16diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp
17index 3ab6d32..725618b 100644
18--- a/Source/FreeImage/ZLibInterface.cpp
19+++ b/Source/FreeImage/ZLibInterface.cpp
20@@ -19,10 +19,9 @@
21 // Use at your own risk!
22 // ==========================================================
23
24-#include "../ZLib/zlib.h"
25+#include <zlib.h>
26 #include "FreeImage.h"
27 #include "Utilities.h"
28-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
29
30 /**
31 Compresses a source buffer into a target buffer, using the ZLib library.
32@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s
33 return 0;
34 case Z_OK: {
35 // patch header, setup crc and length (stolen from mod_trace_output)
36- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code
37+ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code
38 crc = crc32(crc, source, source_size);
39 memcpy(target + 4 + dest_len, &crc, 4);
40 memcpy(target + 8 + dest_len, &source_size, 4);