[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT/LIBLIBEVENT PATCH 5/6] Add patches folder
From: gaulthier gain <gaulthier.gain@xxxxxxxxx> The first patch avoid a static declaration conflicts with the `arc4random_buf` function due to newlib. The second patch avoids a warning during the compilation. Signed-off-by: gaulthier gain <gaulthier.gain@xxxxxxxxx> --- .../0001-avoid-arc4random_buf-conflicts.patch | 38 +++++++++++++++++++ ...date-if_nametoindex-with-lwip-prefix.patch | 29 ++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 patches/0001-avoid-arc4random_buf-conflicts.patch create mode 100644 patches/0002-update-if_nametoindex-with-lwip-prefix.patch diff --git a/patches/0001-avoid-arc4random_buf-conflicts.patch b/patches/0001-avoid-arc4random_buf-conflicts.patch new file mode 100644 index 0000000..1baa249 --- /dev/null +++ b/patches/0001-avoid-arc4random_buf-conflicts.patch @@ -0,0 +1,38 @@ +From 4b609315b31391d85b6391106d53fa4b3b940508 Mon Sep 17 00:00:00 2001 +From: gaulthier gain <gaulthier.gain@xxxxxxxxx> +Date: Fri, 7 Aug 2020 15:29:24 +0000 +Subject: [PATCH] Add macro to avoid conflicts with arc4random + +This patch adds the `EVENT__HAVE_ARC4RANDOM_BUF` macro which is +defined in the `config.h` of the libevent repository in order +to avoid conflicts with libc (musl/newlib) since `arc4random_buf` +is already defined. + +Signed-off-by: gaulthier gain <gaulthier.gain@xxxxxxxxx> +--- + arc4random.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arc4random.c b/arc4random.c +index a2338e6..7b29923 100644 +--- a/arc4random.c ++++ b/arc4random.c +@@ -494,6 +494,7 @@ arc4random(void) + } + #endif + ++#ifndef EVENT__HAVE_ARC4RANDOM_BUF + ARC4RANDOM_EXPORT void + arc4random_buf(void *buf_, size_t n) + { +@@ -507,6 +508,7 @@ arc4random_buf(void *buf_, size_t n) + } + ARC4_UNLOCK_(); + } ++#endif + + #ifndef ARC4RANDOM_NOUNIFORM + /* +-- +2.17.1 + diff --git a/patches/0002-update-if_nametoindex-with-lwip-prefix.patch b/patches/0002-update-if_nametoindex-with-lwip-prefix.patch new file mode 100644 index 0000000..7a8e7ca --- /dev/null +++ b/patches/0002-update-if_nametoindex-with-lwip-prefix.patch @@ -0,0 +1,29 @@ +From cd469df5ae915282bc1cc633c895fc7c4b601aef Mon Sep 17 00:00:00 2001 +From: gaulthier gain <gaulthier.gain@xxxxxxxxx> +Date: Mon, 10 Aug 2020 11:28:45 +0000 +Subject: [PATCH] Update if_nametoindex with lwip prefix + +This patch updates the definition of the `if_nametoindex` function to +`lwip_if_nametoindex` which avoids warning during building. + +Signed-off-by: gaulthier gain <gaulthier.gain@xxxxxxxxx> +--- + evutil.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/evutil.c b/evutil.c +index 9817f08..957c301 100644 +--- a/evutil.c ++++ b/evutil.c +@@ -2007,7 +2007,7 @@ evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp) + if (cp == NULL) + return evutil_inet_pton(af, src, dst); + +- if_index = if_nametoindex(cp + 1); ++ if_index = lwip_if_nametoindex(cp + 1); + if (if_index == 0) { + /* Could be numeric */ + if_index = strtoul(cp + 1, &check, 10); +-- +2.17.1 + -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |