mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
From 4e7ec8233cd185941eaa9e41785cfc53f92799b4 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Bernat <vincent@bernat.ch>
|
||||
Date: Tue, 8 Jan 2019 17:19:15 -0500
|
||||
Subject: [PATCH] build: fix compilation with `--enable-fdp --disable-cdp`
|
||||
|
||||
Fix #315
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/vincentbernat/lldpd/commit/4e7ec8233cd185941eaa9e41785cfc53f92799b4]
|
||||
---
|
||||
src/lldpd-structs.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lldpd-structs.h b/src/lldpd-structs.h
|
||||
index c3ffa108..f6b03d7d 100644
|
||||
--- a/src/lldpd-structs.h
|
||||
+++ b/src/lldpd-structs.h
|
||||
@@ -129,7 +129,7 @@ struct lldpd_dot3_power {
|
||||
MARSHAL(lldpd_dot3_power);
|
||||
#endif
|
||||
|
||||
-#ifdef ENABLE_CDP
|
||||
+#if defined (ENABLE_CDP) || defined (ENABLE_FDP)
|
||||
struct cdpv2_power {
|
||||
u_int16_t request_id;
|
||||
u_int16_t management_id;
|
||||
@@ -273,7 +273,7 @@ struct lldpd_port {
|
||||
struct lldpd_med_power p_med_power;
|
||||
#endif
|
||||
|
||||
-#ifdef ENABLE_CDP
|
||||
+#if defined (ENABLE_CDP) || defined (ENABLE_FDP)
|
||||
struct cdpv2_power p_cdp_power;
|
||||
#endif
|
||||
|
||||
73
package/lldpd/Config.in
Normal file
73
package/lldpd/Config.in
Normal file
@@ -0,0 +1,73 @@
|
||||
config BR2_PACKAGE_LLDPD
|
||||
bool "lldpd"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_LIBEVENT
|
||||
help
|
||||
lldpd is a 802.1ab implementation (LLDP) to help you locate
|
||||
neighbors of all your equipments.
|
||||
|
||||
LLDP allows you to know exactly on which port is a server
|
||||
(and reciprocally).
|
||||
|
||||
LLDP is an industry standard protocol designed to supplant
|
||||
proprietary Link-Layer protocols such as EDP or CDP. The
|
||||
goal of LLDP is to provide an inter-vendor compatible
|
||||
mechanism to deliver Link-Layer notifications to adjacent
|
||||
network devices.
|
||||
|
||||
lldpd is an ISC-licensed implementation of LLDP for various
|
||||
Unixes. It also supports some proprietary protocols.
|
||||
|
||||
https://vincentbernat.github.io/lldpd/
|
||||
|
||||
if BR2_PACKAGE_LLDPD
|
||||
|
||||
config BR2_PACKAGE_LLDPD_CDP
|
||||
bool "CDP"
|
||||
default y
|
||||
help
|
||||
Enable Cisco Discovery Protocol
|
||||
|
||||
config BR2_PACKAGE_LLDPD_FDP
|
||||
bool "FDP"
|
||||
default y
|
||||
help
|
||||
Enable Foundry Discovery Protocol
|
||||
|
||||
config BR2_PACKAGE_LLDPD_EDP
|
||||
bool "EDP"
|
||||
default y
|
||||
help
|
||||
Enable Extreme Discovery Protocol
|
||||
|
||||
config BR2_PACKAGE_LLDPD_SONMP
|
||||
bool "SONMP"
|
||||
default y
|
||||
help
|
||||
Enable SynOptics Network Management
|
||||
|
||||
config BR2_PACKAGE_LLDPD_LLDPMED
|
||||
bool "LLDP-MED"
|
||||
default y
|
||||
help
|
||||
Enable LLDP-MED extension
|
||||
|
||||
config BR2_PACKAGE_LLDPD_DOT1
|
||||
bool "DOT1"
|
||||
default y
|
||||
help
|
||||
Enable Dot1 extension (VLAN stuff)
|
||||
|
||||
config BR2_PACKAGE_LLDPD_DOT3
|
||||
bool "DOT3"
|
||||
default y
|
||||
help
|
||||
Enable Dot3 extension (PHY stuff)
|
||||
|
||||
config BR2_PACKAGE_LLDPD_CUSTOM_TLV
|
||||
bool "Custom TLV"
|
||||
default y
|
||||
help
|
||||
Enable Custom TLV support
|
||||
|
||||
endif
|
||||
25
package/lldpd/S60lldpd
Normal file
25
package/lldpd/S60lldpd
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Controls lldpd.
|
||||
#
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
printf "Starting lldpd: "
|
||||
start-stop-daemon -S -q -p /var/run/lldpd.pid --exec /usr/sbin/lldpd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping lldpd: "
|
||||
start-stop-daemon -K -q -p /var/run/lldpd.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
3
package/lldpd/lldpd.hash
Normal file
3
package/lldpd/lldpd.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 39fced395168015416bfe78b95414facf066f841f349024433aa20ab54e4c360 lldpd-1.0.3.tar.gz
|
||||
sha256 0e96a5aea65f16e2239231ce4ab90497f8bc3bb8fe6abe9299aade4726ff7c8d LICENSE
|
||||
74
package/lldpd/lldpd.mk
Normal file
74
package/lldpd/lldpd.mk
Normal file
@@ -0,0 +1,74 @@
|
||||
################################################################################
|
||||
#
|
||||
# lldpd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LLDPD_VERSION = 1.0.3
|
||||
LLDPD_SITE = http://media.luffy.cx/files/lldpd
|
||||
LLDPD_DEPENDENCIES = \
|
||||
$(if $(BR2_PACKAGE_CHECK),check) \
|
||||
host-pkgconf \
|
||||
$(if $(BR2_PACKAGE_LIBCAP),libcap) \
|
||||
libevent \
|
||||
$(if $(BR2_PACKAGE_VALGRIND),valgrind)
|
||||
LLDPD_LICENSE = ISC
|
||||
LLDPD_LICENSE_FILES = LICENSE
|
||||
|
||||
# Detection of c99 support in configure fails without WCHAR. To enable
|
||||
# automatic detection of c99 support by configure, we need to enable
|
||||
# WCHAR in toolchain. But actually we do not need WCHAR at lldpd
|
||||
# runtime. So requesting WCHAR in toolchain just for automatic detection
|
||||
# will be overkill. To solve this, explicitly -specify c99 here.
|
||||
LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
|
||||
|
||||
LLDPD_CONF_OPTS = \
|
||||
--without-embedded-libevent \
|
||||
--without-seccomp \
|
||||
--without-libbsd \
|
||||
--disable-hardening \
|
||||
--disable-privsep \
|
||||
$(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_FDP),--enable-fdp,--disable-fdp) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_EDP),--enable-edp,--disable-edp) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_SONMP),--enable-sonmp,--disable-sonmp) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_LLDPMED),--enable-lldpmed,--disable-lldpmed) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_DOT1),--enable-dot1,--disable-dot1) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \
|
||||
$(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXML2),y)
|
||||
LLDPD_CONF_OPTS += --with-xml
|
||||
LLDPD_DEPENDENCIES += libxml2
|
||||
else
|
||||
LLDPD_CONF_OPTS += --without-xml
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
LLDPD_CONF_OPTS += --with-snmp
|
||||
LLDPD_DEPENDENCIES += netsnmp
|
||||
LLDPD_CONF_ENV += \
|
||||
ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
|
||||
else
|
||||
LLDPD_CONF_OPTS += --without-snmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
LLDPD_CONF_OPTS += --with-readline
|
||||
LLDPD_DEPENDENCIES += readline
|
||||
else
|
||||
LLDPD_CONF_OPTS += --without-readline
|
||||
endif
|
||||
|
||||
define LLDPD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
|
||||
$(TARGET_DIR)/etc/init.d/S60lldpd
|
||||
endef
|
||||
|
||||
define LLDPD_INSTALL_INIT_SYSTEMD
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/lldpd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lldpd.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user