diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-08-15 12:25:31 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-08-15 12:27:45 -0700 |
| commit | cf2444ac1df685631501d23e508cc65ab00752dc (patch) | |
| tree | 7ce8bccdc9cd57545edca297ffd59cb02b6c6e91 | |
| parent | 288ad311f0eb2c636c7c7eeadc9eb3aedc6d46b9 (diff) | |
| download | meta-openembedded-cf2444ac1df685631501d23e508cc65ab00752dc.tar.gz | |
librelp: Fix function prototypes in tests
Helps fix issues found with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Nicolas Marguet <nicolas.marguet@windriver.com>
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/librelp/0001-tests-Fix-callback-prototype.patch | 49 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-tests-Fix-callback-prototype.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-tests-Fix-callback-prototype.patch new file mode 100644 index 0000000000..ba081926e1 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-tests-Fix-callback-prototype.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 2a7e26510cf9276b7e640ca8282cc1c5e46075d0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 15 Aug 2023 11:59:40 -0700 | ||
| 4 | Subject: [PATCH] tests: Fix callback prototype | ||
| 5 | |||
| 6 | clang errors about it | ||
| 7 | |||
| 8 | | ../../git/tests/receive.c:71:34: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] | ||
| 9 | | 71 | hdlr_enable(int sig, void (*hdlr)()) | ||
| 10 | | | ^ | ||
| 11 | | | void | ||
| 12 | | 1 error generated. | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/260] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | tests/receive.c | 2 +- | ||
| 18 | tests/send.c | 2 +- | ||
| 19 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/tests/receive.c b/tests/receive.c | ||
| 22 | index f376cb4..c12e911 100644 | ||
| 23 | --- a/tests/receive.c | ||
| 24 | +++ b/tests/receive.c | ||
| 25 | @@ -68,7 +68,7 @@ doSleep(int iSeconds, const int iuSeconds) | ||
| 26 | } | ||
| 27 | |||
| 28 | static void | ||
| 29 | -hdlr_enable(int sig, void (*hdlr)()) | ||
| 30 | +hdlr_enable(int sig, void (*hdlr)(const int)) | ||
| 31 | { | ||
| 32 | struct sigaction sigAct; | ||
| 33 | memset(&sigAct, 0, sizeof (sigAct)); | ||
| 34 | diff --git a/tests/send.c b/tests/send.c | ||
| 35 | index d7e90f0..1b1df4f 100644 | ||
| 36 | --- a/tests/send.c | ||
| 37 | +++ b/tests/send.c | ||
| 38 | @@ -57,7 +57,7 @@ struct usrdata { /* used for testing user pointer pass-back */ | ||
| 39 | struct usrdata *userdata = NULL; | ||
| 40 | |||
| 41 | static void | ||
| 42 | -hdlr_enable(int sig, void (*hdlr)()) | ||
| 43 | +hdlr_enable(int sig, void (*hdlr)(const int)) | ||
| 44 | { | ||
| 45 | struct sigaction sigAct; | ||
| 46 | memset(&sigAct, 0, sizeof (sigAct)); | ||
| 47 | -- | ||
| 48 | 2.41.0 | ||
| 49 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb index cbbc31b7d1..eebfece3f2 100644 --- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb +++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb | |||
| @@ -8,6 +8,7 @@ DEPENDS = "gmp nettle libidn zlib gnutls openssl" | |||
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ | 9 | SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \ |
| 10 | file://0001-Fix-function-inline-errors-in-debug-optimization-Og.patch \ | 10 | file://0001-Fix-function-inline-errors-in-debug-optimization-Og.patch \ |
| 11 | file://0001-tests-Fix-callback-prototype.patch \ | ||
| 11 | file://run-ptest \ | 12 | file://run-ptest \ |
| 12 | " | 13 | " |
| 13 | 14 | ||
