Description: Add missing external declarations for header-defined C99 inline
 functions to fix FTBFS at -O0 (undefined references to cork_fmix32,
 cork_fmix64, cork_getblock32, cork_getblock64 and cork_buffer_append_copy).
 Per the convention documented in include/libcork/core/attributes.h, each
 header-defined inline function needs a matching non-inline declaration in a
 source file so an out-of-line copy is emitted for the linker when the
 compiler decides not to inline (e.g. when building with -DCMAKE_BUILD_TYPE=None).
 hash.c already declared cork_hash_buffer & friends; this patch adds the
 declarations that were missing for the hash helpers and cork_buffer_append_copy.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Bug-Debian: https://bugs.debian.org/1022574
Forwarded: not-needed
Last-Update: 2026-09-02

--- libcork-1.0.0~rc3.orig/src/libcork/core/hash.c
+++ libcork-1.0.0~rc3/src/libcork/core/hash.c
@@ -21,3 +21,21 @@
 
 cork_big_hash
 cork_big_hash_buffer(cork_big_hash seed, const void *src, size_t len);
+
+/* External declarations for the C99-inline helpers defined in
+ * include/libcork/core/hash.h.  Per the upstream convention documented in
+ * include/libcork/core/attributes.h, a source file must re-declare each
+ * header-defined inline function so that an out-of-line copy is emitted for
+ * linkers to use when the compiler decides not to inline (e.g. at -O0). */
+
+uint32_t
+cork_getblock32(const uint32_t *p, int i);
+
+uint64_t
+cork_getblock64(const uint64_t *p, int i);
+
+uint32_t
+cork_fmix32(uint32_t h);
+
+uint64_t
+cork_fmix64(uint64_t k);

--- libcork-1.0.0~rc3.orig/src/libcork/ds/buffer.c
+++ libcork-1.0.0~rc3/src/libcork/ds/buffer.c
@@ -105,6 +105,9 @@
 void
 cork_buffer_append_string(struct cork_buffer* buffer, const char* str);
 
+void
+cork_buffer_append_copy(struct cork_buffer* dest, const struct cork_buffer* src);
+
 
 void
 cork_buffer_append_vprintf(struct cork_buffer *buffer, const char *format,
