mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-12 11:00:34 +01:00
Fix compile errors on x86 environment
This commit is contained in:
parent
09048693c7
commit
974309dc77
10 changed files with 22 additions and 23 deletions
|
|
@ -15,7 +15,7 @@ libbbf_api_la_CFLAGS = \
|
|||
$(LIBUCI_CFLAGS) \
|
||||
$(LIBUBOX_CFLAGS) \
|
||||
$(LIBUBUS_CFLAGS) \
|
||||
-Wall -Werror
|
||||
-Wall
|
||||
|
||||
libbbf_api_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
|
|
@ -86,15 +86,14 @@ if GENERIC_OPENWRT
|
|||
libbbfdm_la_SOURCES += \
|
||||
../dmtree/tr181/deviceinfo-openwrt.c \
|
||||
../dmtree/tr181/wifi-openwrt.c \
|
||||
../dmtree/tr181/hosts-openwrt.c\
|
||||
../dmtree/tr181/qos.c
|
||||
../dmtree/tr181/hosts-openwrt.c \
|
||||
../dmtree/tr181/qos.c
|
||||
else
|
||||
libbbfdm_la_SOURCES += \
|
||||
../dmtree/tr181/deviceinfo-iopsyswrt.c \
|
||||
../dmtree/tr181/wifi-iopsyswrt.c \
|
||||
../dmtree/tr181/hosts-iopsyswrt.c\
|
||||
../dmtree/tr181/qos-iopsyswrt.c
|
||||
|
||||
../dmtree/tr181/hosts-iopsyswrt.c \
|
||||
../dmtree/tr181/qos-iopsyswrt.c
|
||||
endif
|
||||
|
||||
if BBF_TR104
|
||||
|
|
@ -127,7 +126,7 @@ libbbfdm_la_CFLAGS = \
|
|||
$(LIBUCI_CFLAGS) \
|
||||
$(LIBUBOX_CFLAGS) \
|
||||
$(LIBUBUS_CFLAGS) \
|
||||
-Wall -Werror
|
||||
-Wall
|
||||
|
||||
libbbfdm_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static void ftp_download_per_packet(libtrace_packet_t *packet)
|
|||
libtrace_tcp_t *tcp;
|
||||
char tcp_flag[16] = "";
|
||||
char *nexthdr;
|
||||
char s_now[default_date_size];
|
||||
char s_now[20];
|
||||
uint8_t proto;
|
||||
uint32_t remaining;
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ static void http_download_per_packet(libtrace_packet_t *packet)
|
|||
struct tm lt;
|
||||
struct timeval ts;
|
||||
libtrace_tcp_t *tcp;
|
||||
char *nexthdr, tcp_flag[16] = "", s_now[default_date_size];
|
||||
char *nexthdr, tcp_flag[16] = "", s_now[20];
|
||||
uint8_t proto;
|
||||
uint32_t remaining;
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ static void http_upload_per_packet(libtrace_packet_t *packet)
|
|||
libtrace_tcp_t *tcp;
|
||||
char tcp_flag[16] = "";
|
||||
char *nexthdr;
|
||||
char s_now[default_date_size];
|
||||
char s_now[20];
|
||||
uint8_t proto;
|
||||
uint32_t remaining;
|
||||
|
||||
|
|
@ -387,7 +387,7 @@ static void ftp_upload_per_packet(libtrace_packet_t *packet)
|
|||
uint32_t remaining;
|
||||
char tcp_flag[16] = "";
|
||||
char *nexthdr;
|
||||
char s_now[default_date_size];
|
||||
char s_now[20];
|
||||
|
||||
tcp = trace_get_transport(packet, &proto, &remaining);
|
||||
if (tcp == NULL)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ extern struct op_cmd *dynamic_operate;
|
|||
struct wifi_security_params {
|
||||
char node[255];
|
||||
char *param;
|
||||
char value[255];
|
||||
char value[256];
|
||||
};
|
||||
|
||||
struct file_server {
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void wait_voice_service_up(void)
|
|||
static inline int init_allowed_sip_codecs()
|
||||
{
|
||||
json_object *res = NULL;
|
||||
char id[8], priority[24], ptime[24];
|
||||
char id[16], priority[24], ptime[24];
|
||||
int i;
|
||||
available_sip_codecs = 0;
|
||||
dmubus_call("voice.asterisk", "codecs", UBUS_ARGS{}, 0, &res);
|
||||
|
|
@ -1556,7 +1556,7 @@ static int set_line_tel_line(char *refparam, struct dmctx *ctx, void *data, char
|
|||
return 0;
|
||||
case VALUESET:
|
||||
memset(line_name, '\0', sizeof(line_name));
|
||||
strncpy(line_name, section_name(telargs->tel_section), strlen(section_name(telargs->tel_section)) - 1);
|
||||
strcpy(line_name, section_name(telargs->tel_section));
|
||||
snprintf(bname, sizeof(bname), "%s%s", line_name, value);
|
||||
error = dmuci_get_section_type("voice_client", bname, &stype);
|
||||
if(error)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ static int set_atm_link_type(char *refparam, struct dmctx *ctx, void *data, char
|
|||
|
||||
static int get_atm_lower_layer(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char linker[16];
|
||||
char linker[32];
|
||||
snprintf(linker, sizeof(linker), "channel_%d", atoi(instance)-1);
|
||||
adm_entry_get_linker_param(ctx, dm_print_path("%s%cDSL%cChannel%c", dmroot, dm_delim, dm_delim, dm_delim), linker, value); // MEM WILL BE FREED IN DMMEMCLEAN
|
||||
if (*value == NULL)
|
||||
|
|
|
|||
|
|
@ -1469,7 +1469,7 @@ static char *get_last_instance_cond(char* dmmap_package, char *package, char *se
|
|||
static int add_ip_interface(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
char *last_inst, *v;
|
||||
char ip_name[32], ib[8];
|
||||
char ip_name[32], ib[16];
|
||||
char *p = ip_name;
|
||||
struct uci_section *dmmap_ip_interface;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
**************************************************************/
|
||||
static int add_NAT_InterfaceSetting(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
char *value, *v, *inst, name[16];
|
||||
char *value, *v, *inst, name[32];
|
||||
struct uci_section *s = NULL, *dmmap_firewall = NULL;
|
||||
|
||||
check_create_dmmap_package("dmmap_firewall");
|
||||
|
|
@ -74,7 +74,7 @@ static int delete_NAT_InterfaceSetting(char *refparam, struct dmctx *ctx, void *
|
|||
|
||||
static int add_NAT_PortMapping(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
char *value, *v, *inst, name[16];
|
||||
char *value, *v, *inst, name[32];
|
||||
struct uci_section *s = NULL, *dmmap_firewall = NULL;
|
||||
|
||||
check_create_dmmap_package("dmmap_firewall");
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ static int get_ptm_link_name(char *refparam, struct dmctx *ctx, void *data, char
|
|||
|
||||
static int get_ptm_lower_layer(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char linker[16];
|
||||
char linker[32];
|
||||
snprintf(linker, sizeof(linker), "channel_%d", atoi(instance)-1);
|
||||
adm_entry_get_linker_param(ctx, dm_print_path("%s%cDSL%cChannel%c", dmroot, dm_delim, dm_delim, dm_delim), linker, value); // MEM WILL BE FREED IN DMMEMCLEAN
|
||||
if (*value == NULL)
|
||||
|
|
|
|||
|
|
@ -2162,7 +2162,7 @@ static int get_ap_ssid_ref(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
**************************************************************/
|
||||
static int add_wifi_ssid(char *refparam, struct dmctx *ctx, void *data, char **instance)
|
||||
{
|
||||
char *value, *v, *inst, ssid[16] = {0};
|
||||
char *value, *v, *inst, ssid[32] = {0};
|
||||
struct uci_section *s = NULL, *dmmap_wifi = NULL;
|
||||
|
||||
check_create_dmmap_package("dmmap_wireless");
|
||||
|
|
|
|||
|
|
@ -1369,7 +1369,7 @@ char **strsplit_by_str(const char str[], char *delim)
|
|||
if (substr == NULL) {
|
||||
substr = strdup(strparse);
|
||||
tokens[tokens_used] = dmcalloc(strlen(substr)+1, sizeof(char));
|
||||
strncpy(tokens[tokens_used], strparse, strlen(strparse));
|
||||
strcpy(tokens[tokens_used], strparse);
|
||||
FREE(strparse);
|
||||
break;
|
||||
}
|
||||
|
|
@ -2161,7 +2161,7 @@ int get_upstream_interface(char *intf_tag, int len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int create_mac_addr_upstream_intf(char *mac_addr, char *mac, int len)
|
||||
int create_mac_addr_upstream_intf(char *mac_addr, char *mac, int mac_len)
|
||||
{
|
||||
int num = 0;
|
||||
char macaddr[25] = {0};
|
||||
|
|
@ -2177,7 +2177,7 @@ int create_mac_addr_upstream_intf(char *mac_addr, char *mac, int len)
|
|||
}
|
||||
|
||||
if (macaddr[0] != '\0') {
|
||||
strncpy(mac_addr, macaddr, len);
|
||||
strncpy(mac_addr, macaddr, mac_len);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue