aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-01-28 09:41:29 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-28 13:03:22 -0800
commit629188ede7ee00c925ef28b85b1e68fc9e05fb93 (patch)
tree27de4e9a05a979cf966b04eb58a8a2f43a218628
parentgit-compat-util: drop `z_const` define (diff)
downloadgit-629188ede7ee00c925ef28b85b1e68fc9e05fb93.tar.gz
git-629188ede7ee00c925ef28b85b1e68fc9e05fb93.zip
compat: introduce new "zlib.h" header
Introduce a new "compat/zlib-compat.h" header that we include instead of including <zlib.h> directly. This will allow us to wire up zlib-ng as an alternative backend for zlib compression in a subsequent commit. Note that we cannot just call the file "compat/zlib.h", as that may otherwise cause us to include that file instead of <zlib.h>. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--compat/zlib-compat.h6
-rw-r--r--git-compat-util.h2
-rw-r--r--reftable/block.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/compat/zlib-compat.h b/compat/zlib-compat.h
new file mode 100644
index 0000000000..bc20b884ef
--- /dev/null
+++ b/compat/zlib-compat.h
@@ -0,0 +1,6 @@
+#ifndef COMPAT_ZLIB_H
+#define COMPAT_ZLIB_H
+
+#include <zlib.h>
+
+#endif /* COMPAT_ZLIB_H */
diff --git a/git-compat-util.h b/git-compat-util.h
index c4b4b372b4..1ca2671322 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -1537,7 +1537,7 @@ int cmd_main(int, const char **);
int common_exit(const char *file, int line, int code);
#define exit(code) exit(common_exit(__FILE__, __LINE__, (code)))
-#include <zlib.h>
+#include "compat/zlib-compat.h"
/*
* This include must come after system headers, since it introduces macros that
diff --git a/reftable/block.c b/reftable/block.c
index 9858bbc7c5..bc9b079634 100644
--- a/reftable/block.c
+++ b/reftable/block.c
@@ -13,7 +13,7 @@ https://developers.google.com/open-source/licenses/bsd
#include "record.h"
#include "reftable-error.h"
#include "system.h"
-#include <zlib.h>
+#include "compat/zlib-compat.h"
int header_size(int version)
{
n title='2025-10-01 10:28:56 +0100'>2025-10-01mfd: cs42l43: Remove IRQ masking in suspendCharles Keepax1-26/+0 2025-10-01mfd: cs42l43: Move IRQ enable/disable to encompass force suspendCharles Keepax1-4/+4 2025-10-01mfd: ls2kbmc: Add Loongson-2K BMC reset function supportBinbin Zhou1-0/+339 2025-10-01mfd: ls2kbmc: Introduce Loongson-2K BMC core driverBinbin Zhou4-0/+210 2025-10-01mfd: bd71828, bd71815: Prepare for power-supply supportMatti Vaittinen2-9/+98 2025-10-01dt-bindings: mfd: aspeed: Add AST2700 SCU compatiblesRyan Chen1-0/+4 2025-10-01dt-bindings: mfd: Convert aspeed,ast2400-p2a-ctrl to DT schemaRob Herring (Arm)2-47/+32 2025-10-01dt-bindings: mfd: fsl,mc13xxx: Add buttons nodeAlexander Kurz1-0/+70 2025-10-01dt-bindings: mfd: fsl,mc13xxx: Convert txt to DT schemaAlexander Kurz2-156/+218 2025-10-01mfd: macsmc: Add "apple,t8103-smc" compatibleJanne Grunau1-0/+1 2025-10-01mfd: core: Increment of_node's refcount before linking it to the platform deviceBastien Curutchet1-0/+1 2025-10-01dt-bindings: mfd: syscon: Document the control-scb syscon on PolarFire SoCConor Dooley1-0/+2 2025-10-01mfd: simple-mfd-i2c: Add SpacemiT P1 supportAlex Elder2-0/+30