From: Khem Raj
(From OE-Core rev: c53d465865d4a9c109322074c2653a3a8b665238)
Signed-off-by: Khem Raj
Signed-off-by: Alexandre Belloni
Signed-off-by: Richard Purdie
(cherry picked from commit 51d8e0e20e2965517a64e954d51a23be52e5f4f3)
Signed-off-by: pawan
---
...-prototypes-to-function-declarations.patch | 182 ++
meta/recipes-devtools/rsync/rsync_3.2.5.bb| 1 +
2 files changed, 183 insertions(+)
create mode 100644
meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch
diff --git
a/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch
b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch
new file mode 100644
index 00..629b786d62
--- /dev/null
+++
b/meta/recipes-devtools/rsync/files/0001-Add-missing-prototypes-to-function-declarations.patch
@@ -0,0 +1,182 @@
+From 704a240443ca5d8024cc3b01ae6c1440fa41f54a Mon Sep 17 00:00:00 2001
+From: Khem Raj
+Date: Tue, 16 Aug 2022 23:42:24 -0700
+Subject: [PATCH] Add missing prototypes to function declarations
+
+With Clang 15+ compiler -Wstrict-prototypes is triggering warnings which
+are turned into errors with -Werror, this fixes the problem by adding
+missing prototypes
+
+Fixes errors like
+| log.c:134:24: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
+| static void syslog_init()
+|^
+| void
+
+Upstream-Status: Submitted
[https://lists.samba.org/archive/rsync/2022-August/032858.html]
+Signed-off-by: Khem Raj
+---
+ checksum.c | 2 +-
+ exclude.c| 2 +-
+ hlink.c | 2 +-
+ lib/compat.c | 1 +
+ lib/pool_alloc.c | 2 +-
+ log.c| 2 +-
+ main.c | 2 +-
+ syscall.c| 4 ++--
+ zlib/crc32.c | 2 +-
+ zlib/trees.c | 2 +-
+ zlib/zutil.c | 4 ++--
+ 11 files changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/checksum.c b/checksum.c
+index fb8c0a0..174c28c 100644
+--- a/checksum.c
b/checksum.c
+@@ -629,7 +629,7 @@ int sum_end(char *sum)
+ return csum_len_for_type(cursum_type, 0);
+ }
+
+-void init_checksum_choices()
++void init_checksum_choices(void)
+ {
+ #ifdef SUPPORT_XXH3
+ char buf[32816];
+diff --git a/exclude.c b/exclude.c
+index adc82e2..79f5a82 100644
+--- a/exclude.c
b/exclude.c
+@@ -358,7 +358,7 @@ void implied_include_partial_string(const char *s_start,
const char *s_end)
+ memcpy(partial_string_buf, s_start, partial_string_len);
+ }
+
+-void free_implied_include_partial_string()
++void free_implied_include_partial_string(void)
+ {
+ if (partial_string_buf) {
+ free(partial_string_buf);
+diff --git a/hlink.c b/hlink.c
+index 66810a3..aea142b 100644
+--- a/hlink.c
b/hlink.c
+@@ -117,7 +117,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count)
+ struct ht_int32_node *node = NULL;
+ int32 gnum, gnum_next;
+
+- qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)())
hlink_compare_gnum);
++ qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)(const void *,
const void *)) hlink_compare_gnum);
+
+ for (from = 0; from < ndx_count; from++) {
+ file = hlink_flist->sorted[ndx_list[from]];
+diff --git a/lib/compat.c b/lib/compat.c
+index 513d79b..89b337e 100644
+--- a/lib/compat.c
b/lib/compat.c
+@@ -19,6 +19,7 @@
+ * with this program; if not, visit the http://fsf.org website.
+ */
+
++#include
+ #include "rsync.h"
+ #include "itypes.h"
+
+diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c
+index a1a7245..4eae062 100644
+--- a/lib/pool_alloc.c
b/lib/pool_alloc.c
+@@ -9,7 +9,7 @@ struct alloc_pool
+ size_t size; /* extent size */
+ size_t quantum;/* allocation quantum */
+ struct pool_extent *extents; /* top extent is "live" */
+- void(*bomb)(); /* called if malloc fails */
++ void(*bomb)(const char *, const char *, int);
/* called if malloc fails */
+ int flags;
+
+ /* statistical data */
+diff --git a/log.c b/log.c
+index 44344e2..991e359 100644
+--- a/log.c
b/log.c
+@@ -131,7 +131,7 @@ static void logit(int priority, const char *buf)
+ }
+ }
+
+-static void syslog_init()
++static void syslog_init(void)
+ {
+ int options = LOG_PID;
+
+diff --git a/main.c b/main.c
+index 9ebfbea..affa244 100644
+--- a/main.c
b/main.c
+@@ -244,7 +244,7 @@ void read_del_stats(int f)
+ stats.deleted_files += stats.deleted_specials = read_varint(f);
+ }
+
+-static void become_copy_as_user()
++static void become_copy_as_user(void)
+ {
+ char *gname;
+ uid_t uid;
+diff --git a/syscall.c b/syscall.c
+index d92074a..92ca86d 100644
+--- a/syscall.c
b/syscall.c
+@@ -389,9 +389,9 @@ OFF_T do_lseek(int