mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Use common CFLAGS in all src-packages.
And fix bugs that the new CFLAGS find.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
CONFD_VERSION = 1.0
|
||||
CONFD_SITE_METHOD = local
|
||||
CONFD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/confd
|
||||
@@ -12,6 +13,9 @@ CONFD_LICENSE_FILES = LICENSE
|
||||
CONFD_REDISTRIBUTE = NO
|
||||
CONFD_DEPENDENCIES = augeas jansson libite sysrepo libsrx
|
||||
CONFD_AUTORECONF = YES
|
||||
define CONFD_CONF_ENV
|
||||
CFLAGS="$(INFIX_CFLAGS)"
|
||||
endef
|
||||
|
||||
define CONFD_INSTALL_EXTRA
|
||||
cp $(CONFD_PKGDIR)/confd.conf $(FINIT_D)/available/
|
||||
|
||||
@@ -11,6 +11,10 @@ FACTORY_SITE_METHOD = local
|
||||
FACTORY_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/factory
|
||||
FACTORY_REDISTRIBUTE = NO
|
||||
|
||||
define FACTORY_CONF_ENV
|
||||
CFLAGS="$(INFIX_CFLAGS)"
|
||||
endef
|
||||
|
||||
define FACTORY_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
||||
LDLIBS="$(TARGET_LDFLAGS)"
|
||||
|
||||
@@ -13,6 +13,10 @@ KLISH_PLUGIN_INFIX_REDISTRIBUTE = NO
|
||||
KLISH_PLUGIN_INFIX_DEPENDENCIES = klish-plugin-sysrepo
|
||||
KLISH_PLUGIN_INFIX_AUTORECONF = YES
|
||||
|
||||
define KLISH_PLUGIN_INFIX_CONF_ENV
|
||||
CFLAGS="$(INFIX_CFLAGS)"
|
||||
endef
|
||||
|
||||
define KLISH_PLUGIN_INFIX_INSTALL_DOC
|
||||
$(INSTALL) -t $(TARGET_DIR)/usr/share/infix/cli -D -m 0644 \
|
||||
$(wildcard $(BR2_EXTERNAL_INFIX_PATH)/doc/cli/*.md)
|
||||
|
||||
@@ -13,5 +13,7 @@ LIBSRX_INSTALL_STAGING = YES
|
||||
LIBSRX_REDISTRIBUTE = NO
|
||||
LIBSRX_DEPENDENCIES = sysrepo
|
||||
LIBSRX_AUTORECONF = YES
|
||||
|
||||
define LIBSRX_CONF_ENV
|
||||
CFLAGS="$(INFIX_CFLAGS)"
|
||||
endef
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -12,6 +12,10 @@ STATD_LICENSE_FILES = LICENSE
|
||||
STATD_REDISTRIBUTE = NO
|
||||
STATD_DEPENDENCIES = sysrepo libev libsrx jansson
|
||||
|
||||
define STATD_CONF_ENV
|
||||
CFLAGS="$(INFIX_CFLAGS)"
|
||||
endef
|
||||
|
||||
define STATD_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
|
||||
AM_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE -D_GNU_SOURCE -DYANG_PATH_=\"$(YANGDIR)\"
|
||||
CLEANFILES = $(rauc_installer_sources)
|
||||
plugindir = $(srpdplugindir)
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
#include <srx/srx_val.h>
|
||||
|
||||
#include "core.h"
|
||||
#define ARPING_MSEC 1000
|
||||
#define MODULE "infix-dhcp-client"
|
||||
#define XPATH "/infix-dhcp-client:dhcp-client"
|
||||
#define ARPING_MSEC 1000
|
||||
#define MODULE "infix-dhcp-client"
|
||||
#define XPATH "/infix-dhcp-client:dhcp-client"
|
||||
#define CACHE_TEMPLATE "/var/lib/misc/%s.cache"
|
||||
|
||||
static const struct srx_module_requirement reqs[] = {
|
||||
{ .dir = YANG_PATH_, .name = MODULE, .rev = "2024-01-30" },
|
||||
@@ -25,15 +26,15 @@ static const struct srx_module_requirement reqs[] = {
|
||||
|
||||
static char *ip_cache(const char *ifname, char *str, size_t len)
|
||||
{
|
||||
const char *fn = "/var/lib/misc/%s.cache";
|
||||
|
||||
struct in_addr ina;
|
||||
char buf[128];
|
||||
FILE *fp;
|
||||
|
||||
if (!fexistf(fn, ifname))
|
||||
if (!fexistf(CACHE_TEMPLATE, ifname))
|
||||
return NULL;
|
||||
|
||||
fp = fopenf("r", fn, ifname);
|
||||
fp = fopenf("r", CACHE_TEMPLATE, ifname);
|
||||
if (!fp)
|
||||
return NULL;
|
||||
|
||||
@@ -45,7 +46,7 @@ static char *ip_cache(const char *ifname, char *str, size_t len)
|
||||
chomp(buf);
|
||||
|
||||
if (!inet_aton(buf, &ina)) {
|
||||
erasef(fn, ifname);
|
||||
erasef(CACHE_TEMPLATE, ifname);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user