Skip to content

Commit

Permalink
Merge branch 'V5-9-patches'
Browse files Browse the repository at this point in the history
* V5-9-patches:
  net-snmp-configure: Respect the $CFLAGS environment variable
  IP-MIB: Fix the --disable-ipv6 build
  IF-MIB: Add more comments
  ci/build.sh: Show the $CC compiler path if $CC has been set
  ci/net-snmp-run-tests: Do not rerun configure

# Conflicts:
#	ci/build.sh
  • Loading branch information
bvanassche committed Aug 20, 2021
2 parents 0486e1a + 5dd3b37 commit 96942be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ netsnmp_feature_child_of(ipaddress_arch_entry_copy, ipaddress_common);
netsnmp_feature_require(ipaddress_ioctl_entry_copy);
#endif /* NETSNMP_FEATURE_REQUIRE_IPADDRESS_ARCH_ENTRY_COPY */

#if defined (NETSNMP_ENABLE_IPV6)
#include <linux/types.h>
#include <asm/types.h>
#if defined(HAVE_LINUX_RTNETLINK_H)
Expand All @@ -40,7 +39,6 @@ netsnmp_feature_require(ipaddress_ioctl_entry_copy);
#define SUPPORT_PREFIX_FLAGS 1
#endif /* RTMGRP_IPV6_PREFIX */
#endif /* HAVE_LINUX_RTNETLINK_H */
#endif

#include "ipaddress.h"
#include "ipaddress_ioctl.h"
Expand Down Expand Up @@ -220,7 +218,7 @@ _load_v6(netsnmp_container *container, int idx_offset)
"cannot get ip address information"
"as netlink socket is not available\n"));
return -1;
#else
#else /* HAVE_LINUX_RTNETLINK_H */
FILE *in;
char line[80], addr[40];
char if_name[IFNAMSIZ+1];/* +1 for '\0' because of the ugly sscanf below */
Expand Down Expand Up @@ -430,7 +428,9 @@ _load_v6(netsnmp_container *container, int idx_offset)
return rc;

return idx_offset;
#endif /* HAVE_LINUX_RTNETLINK_H */
}
#endif /* NETSNMP_ENABLE_IPV6 */

struct address_flag_info
netsnmp_access_other_info_get(int index, int family)
Expand Down Expand Up @@ -519,9 +519,9 @@ netsnmp_access_other_info_get(int index, int family)
out:
close(sd);
return addr;
#endif
}

#if defined (NETSNMP_ENABLE_IPV6)
#ifdef HAVE_LINUX_RTNETLINK_H
int
netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt,
Expand Down Expand Up @@ -621,6 +621,5 @@ netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt,
close(sd);
return ret;
}
#endif
#endif

#endif /* HAVE_LINUX_RTNETLINK_H */
#endif /* defined(NETSNMP_ENABLE_IPV6) */
2 changes: 1 addition & 1 deletion ci/net-snmp-configure
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ options=()
options+=(--enable-developer)
options+=(--enable-ipv6)
options+=("--prefix=/usr/local/net-snmp-${branch_name}")
options+=("--with-cflags=$cflags")
options+=("--with-cflags=$CFLAGS")
options+=(--with-defaults)
transports=()
# Mib names can be found as follows:
Expand Down

0 comments on commit 96942be

Please sign in to comment.