From 9a00fbd01421ca1a98d8ddbb0056a5eb00473f7c Mon Sep 17 00:00:00 2001
From: Sam Russell <sam.h.russell@gmail.com>
Date: Thu, 31 Oct 2024 13:52:21 +0100
Subject: [PATCH] crc: Fix bugs when building GZIP

* lib/crc-generate-table.c: Mark all functions static
* modules/crc: Remove MAINTAINERCLEANFILES reference
---
 ChangeLog                | 5 +++++
 lib/crc-generate-table.c | 8 ++++----
 modules/crc              | 1 -
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0719c23bf..472624a913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-31 Sam Russell <sam.h.russell@gmail.com>
+	crc: Fix bugs when building GZIP
+	* lib/crc-generate-table.c: Mark all functions static
+	* modules/crc: Remove MAINTAINERCLEANFILES reference
+
 2024-10-31  Simon Josefsson  <simon@josefsson.org>
 
 	crc: make it a maintainer setting rather than a user setting.
diff --git a/lib/crc-generate-table.c b/lib/crc-generate-table.c
index 01f9ff77ed..f4e0301d24 100644
--- a/lib/crc-generate-table.c
+++ b/lib/crc-generate-table.c
@@ -42,7 +42,7 @@
  */
 unsigned long crc_table[256];
 
-void
+static void
 make_crc_table (int bits)
 {
   unsigned long c;
@@ -62,7 +62,7 @@ make_crc_table (int bits)
     }
 }
 
-void
+static void
 print_crc_table (FILE * stream, int bits)
 {
   make_crc_table (bits);
@@ -82,7 +82,7 @@ print_crc_table (FILE * stream, int bits)
   fprintf (stream, "  }");
 }
 
-void
+static void
 print_header (FILE * stream)
 {
   fprintf (stream, "/* Slice-by-8 lookup tables */\n");
@@ -97,7 +97,7 @@ print_header (FILE * stream)
   fprintf (stream, "};\n\n");
 }
 
-void
+static void
 print_copyright_notice (FILE * stream)
 {
   fprintf (stream, "/* crc.c -- cyclic redundancy checks\n");
diff --git a/modules/crc b/modules/crc
index d62650b28a..8a6881fa3d 100644
--- a/modules/crc
+++ b/modules/crc
@@ -24,7 +24,6 @@ $(srcdir)/crc-sliceby8.h: $(srcdir)/crc-generate-table.c
 	&& mv $(srcdir)/crc-sliceby8.h-t $(srcdir)/crc-sliceby8.h
 BUILT_SOURCES        += crc-sliceby8.h
 MOSTLYCLEANFILES     += crc-sliceby8.h-t crc-generate-table
-MAINTAINERCLEANFILES += crc-sliceby8.h
 EXTRA_DIST           += crc-sliceby8.h
 
 Include:
-- 
2.34.1

