diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-22 09:50:43 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-09-13 18:20:09 -0700 |
commit | 14135847192a18777f4d8744ed172aba073062c8 (patch) | |
tree | 2f6c94630af943864360c63d708cde1775a0d2da /meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch | |
parent | ad50bde57469a8febaed9fd6f5b983c88ccf0e1f (diff) | |
download | meta-openembedded-14135847192a18777f4d8744ed172aba073062c8.tar.gz |
openflow: Fix build with musl
Regenerate configure before running oe_runconf
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
(cherry picked from commit a669e44708e985f717b6af876fe5e5e24e9afa17)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch')
-rw-r--r-- | meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch b/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch new file mode 100644 index 000000000..952274bb9 --- /dev/null +++ b/meta-networking/recipes-protocols/openflow/openflow/0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 7b62e5884353b247f542844d1e4687d0e9211999 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 20 Jul 2017 04:27:32 -0700 | ||
4 | Subject: [PATCH 1/2] Check and use strlcpy from libc before defining own | ||
5 | |||
6 | This is required especially on musl where | ||
7 | function prototype conflicts and causes build | ||
8 | failures. | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 2 +- | ||
13 | lib/util.c | 2 ++ | ||
14 | lib/util.h | 1 + | ||
15 | 3 files changed, 4 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 13064f6..596c43f 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -57,7 +57,7 @@ OFP_CHECK_HWTABLES | ||
22 | OFP_CHECK_HWLIBS | ||
23 | AC_SYS_LARGEFILE | ||
24 | |||
25 | -AC_CHECK_FUNCS([strsignal]) | ||
26 | +AC_CHECK_FUNCS([strlcpy strsignal]) | ||
27 | |||
28 | AC_ARG_VAR(KARCH, [Kernel Architecture String]) | ||
29 | AC_SUBST(KARCH) | ||
30 | diff --git a/lib/util.c b/lib/util.c | ||
31 | index 21cc28d..1f341b1 100644 | ||
32 | --- a/lib/util.c | ||
33 | +++ b/lib/util.c | ||
34 | @@ -138,6 +138,7 @@ xasprintf(const char *format, ...) | ||
35 | return s; | ||
36 | } | ||
37 | |||
38 | +#ifndef HAVE_STRLCPY | ||
39 | void | ||
40 | strlcpy(char *dst, const char *src, size_t size) | ||
41 | { | ||
42 | @@ -148,6 +149,7 @@ strlcpy(char *dst, const char *src, size_t size) | ||
43 | dst[n_copy] = '\0'; | ||
44 | } | ||
45 | } | ||
46 | +#endif | ||
47 | |||
48 | void | ||
49 | ofp_fatal(int err_no, const char *format, ...) | ||
50 | diff --git a/lib/util.h b/lib/util.h | ||
51 | index fde681f..9e45ea9 100644 | ||
52 | --- a/lib/util.h | ||
53 | +++ b/lib/util.h | ||
54 | @@ -41,6 +41,7 @@ | ||
55 | #include <stdio.h> | ||
56 | #include <string.h> | ||
57 | #include "compiler.h" | ||
58 | +#include "config.h" | ||
59 | |||
60 | #ifndef va_copy | ||
61 | #ifdef __va_copy | ||
62 | -- | ||
63 | 2.13.3 | ||
64 | |||