[PATCH 2/4] fixup! reftable: utility functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



remove forward declaration for strbuf that is no longer needed once
strbuf.h was included.

add a conditional declaration for the zlib function that then can
be used in both the compat definition and the block.c user without
triggering -Wmissing-prototypes:

compat/zlib-uncompress2.c:36:13: error: no previous prototype for function
      'uncompress2' [-Werror,-Wmissing-prototypes]
int ZEXPORT uncompress2 (
            ^
compat/zlib-uncompress2.c:36:1: note: declare 'static' if the function is not
      intended to be used outside of this translation unit
int ZEXPORT uncompress2 (
^
static
1 error generated.
gmake: *** [Makefile:2571: compat/zlib-uncompress2.o] Error 1

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
---
 reftable/system.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/reftable/system.h b/reftable/system.h
index 4f62827b83..4907306c0c 100644
--- a/reftable/system.h
+++ b/reftable/system.h
@@ -18,7 +18,15 @@ license that can be found in the LICENSE file or at
 
 #include <zlib.h>
 
-struct strbuf;
+#ifdef NO_UNCOMPRESS2
+/*
+ * This is uncompress2, which is only available in zlib >= 1.2.9
+ * (released as of early 2017)
+ */
+int uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source,
+		uLong *sourceLen);
+#endif
+
 int hash_size(uint32_t id);
 
 #endif
-- 
2.33.0.481.g26d3bed244




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux