diff options
| -rw-r--r-- | meta-networking/recipes-daemons/lldpad/lldpad/0001-get-inline-functions-work-with-both-gnu11-and-gnu89.patch | 99 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/lldpad/lldpad_0.9.46.bb | 29 |
2 files changed, 0 insertions, 128 deletions
diff --git a/meta-networking/recipes-daemons/lldpad/lldpad/0001-get-inline-functions-work-with-both-gnu11-and-gnu89.patch b/meta-networking/recipes-daemons/lldpad/lldpad/0001-get-inline-functions-work-with-both-gnu11-and-gnu89.patch deleted file mode 100644 index 9ff7c0f8fb..0000000000 --- a/meta-networking/recipes-daemons/lldpad/lldpad/0001-get-inline-functions-work-with-both-gnu11-and-gnu89.patch +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | From 67399dcc2575c0e9c64fc77354f9653127cddf64 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Roy Li <rongqing.li@windriver.com> | ||
| 3 | Date: Mon, 14 Sep 2015 17:07:26 +0800 | ||
| 4 | Subject: [PATCH] get inline functions work with both gnu11 and gnu89 | ||
| 5 | |||
| 6 | Upstream-status: Pending | ||
| 7 | |||
| 8 | After gcc upgraded to gcc5, and if the codes are compiled without optimization(-O0), | ||
| 9 | and the below error will happen: | ||
| 10 | |||
| 11 | ./include/lldp_8021qaz.h:237:12: error: inline function 'ieee8021qaz_clif_cmd' declared but never defined [-Werror] | ||
| 12 | inline int ieee8021qaz_clif_cmd(void *data, struct sockaddr_un *from, | ||
| 13 | ^ | ||
| 14 | ./include/lldp_8021qaz.h:222:13: error: inline function 'set_prio_map' declared but never defined [-Werror] | ||
| 15 | inline void set_prio_map(u32 *prio_map, u8 prio, int tc); | ||
| 16 | ^ | ||
| 17 | ./include/lldp_8021qaz.h:221:12: error: inline function 'get_prio_map' declared but never defined [-Werror] | ||
| 18 | inline int get_prio_map(u32 prio_map, int tc); | ||
| 19 | |||
| 20 | gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C | ||
| 21 | source file has the callable copy of the inline function. Consider the following | ||
| 22 | program: | ||
| 23 | |||
| 24 | inline int | ||
| 25 | foo (void) | ||
| 26 | { | ||
| 27 | return 42; | ||
| 28 | } | ||
| 29 | |||
| 30 | int | ||
| 31 | main (void) | ||
| 32 | { | ||
| 33 | return foo (); | ||
| 34 | } | ||
| 35 | |||
| 36 | The program above will not link with the C99 inline semantics, because no out-of-line | ||
| 37 | function foo is generated. To fix this, either mark the function foo as static, or | ||
| 38 | add the following declaration: | ||
| 39 | static inline int foo (void); | ||
| 40 | |||
| 41 | more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html; | ||
| 42 | |||
| 43 | but the use of "extern inline" will lead to the compilation issue if gcc is not | ||
| 44 | gcc5, so replace inline with "static inline" | ||
| 45 | |||
| 46 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 47 | --- | ||
| 48 | include/lldp_8021qaz.h | 5 ----- | ||
| 49 | lldp_8021qaz.c | 4 ++-- | ||
| 50 | 2 files changed, 2 insertions(+), 7 deletions(-) | ||
| 51 | |||
| 52 | diff --git a/include/lldp_8021qaz.h b/include/lldp_8021qaz.h | ||
| 53 | index 55353b8..d321625 100644 | ||
| 54 | --- a/include/lldp_8021qaz.h | ||
| 55 | +++ b/include/lldp_8021qaz.h | ||
| 56 | @@ -218,8 +218,6 @@ int ieee8021qaz_mod_app(struct app_tlv_head *head, int peer, | ||
| 57 | u8 prio, u8 sel, u16 proto, u32 ops); | ||
| 58 | int ieee8021qaz_app_sethw(char *ifname, struct app_tlv_head *head); | ||
| 59 | |||
| 60 | -inline int get_prio_map(u32 prio_map, int tc); | ||
| 61 | -inline void set_prio_map(u32 *prio_map, u8 prio, int tc); | ||
| 62 | |||
| 63 | struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *); | ||
| 64 | |||
| 65 | @@ -234,9 +232,6 @@ int ieee8021qaz_rchange(struct port *port, struct lldp_agent *, | ||
| 66 | void ieee8021qaz_ifup(char *ifname, struct lldp_agent *); | ||
| 67 | void ieee8021qaz_ifdown(char *ifname, struct lldp_agent *); | ||
| 68 | u8 ieee8021qaz_mibDeleteObject(struct port *port, struct lldp_agent *); | ||
| 69 | -inline int ieee8021qaz_clif_cmd(void *data, struct sockaddr_un *from, | ||
| 70 | - socklen_t fromlen, char *ibuf, int ilen, | ||
| 71 | - char *rbuf); | ||
| 72 | int ieee8021qaz_check_operstate(void); | ||
| 73 | int get_dcbx_hw(const char *ifname, __u8 *dcbx); | ||
| 74 | |||
| 75 | diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c | ||
| 76 | index 094676d..f154317 100644 | ||
| 77 | --- a/lldp_8021qaz.c | ||
| 78 | +++ b/lldp_8021qaz.c | ||
| 79 | @@ -396,7 +396,7 @@ static int read_cfg_file(char *ifname, struct lldp_agent *agent, | ||
| 80 | return 0; | ||
| 81 | } | ||
| 82 | |||
| 83 | -inline int get_prio_map(u32 prio_map, int prio) | ||
| 84 | +static inline int get_prio_map(u32 prio_map, int prio) | ||
| 85 | { | ||
| 86 | if (prio > 7) | ||
| 87 | return 0; | ||
| 88 | @@ -404,7 +404,7 @@ inline int get_prio_map(u32 prio_map, int prio) | ||
| 89 | return (prio_map >> (4 * (7-prio))) & 0xF; | ||
| 90 | } | ||
| 91 | |||
| 92 | -inline void set_prio_map(u32 *prio_map, u8 prio, int tc) | ||
| 93 | +static inline void set_prio_map(u32 *prio_map, u8 prio, int tc) | ||
| 94 | { | ||
| 95 | u32 mask = ~(0xffffffff & (0xF << (4 * (7-prio)))); | ||
| 96 | *prio_map &= mask; | ||
| 97 | -- | ||
| 98 | 1.9.1 | ||
| 99 | |||
diff --git a/meta-networking/recipes-daemons/lldpad/lldpad_0.9.46.bb b/meta-networking/recipes-daemons/lldpad/lldpad_0.9.46.bb deleted file mode 100644 index b191df59e3..0000000000 --- a/meta-networking/recipes-daemons/lldpad/lldpad_0.9.46.bb +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | SUMMARY = "Intel LLDP Agent" | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | This package contains the Linux user space daemon and configuration tool for \ | ||
| 4 | Intel LLDP Agent with Enhanced Ethernet support for the Data Center." | ||
| 5 | SECTION = "net" | ||
| 6 | LICENSE = "GPLv2" | ||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162" | ||
| 8 | DEPENDS = "libconfig libnl readline" | ||
| 9 | SRCREV = "48a5f38778b18d6659a672ccb4640f25c6720827" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/jrfastab/lldpad.git;protocol=http \ | ||
| 12 | file://0001-get-inline-functions-work-with-both-gnu11-and-gnu89.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | S = "${WORKDIR}/git" | ||
| 16 | |||
| 17 | inherit autotools-brokensep pkgconfig systemd | ||
| 18 | |||
| 19 | do_configure_prepend() { | ||
| 20 | sed -i "s:-Werror::g" ${S}/Makefile.am | ||
| 21 | } | ||
| 22 | |||
| 23 | do_install_append () { | ||
| 24 | install -m 0755 -d ${D}${systemd_unitdir} | ||
| 25 | mv ${D}${prefix}${systemd_unitdir}/* ${D}${systemd_unitdir}/ | ||
| 26 | rmdir ${D}${prefix}${systemd_unitdir} | ||
| 27 | } | ||
| 28 | |||
| 29 | FILES_${PN} += "${systemd_unitdir}" | ||
