Skip to content

Commit

Permalink
SunOS: fix compilation issues.
Browse files Browse the repository at this point in the history
Linux: add Docker build scripts for CentOS6.
  • Loading branch information
Neil Mckee authored and Neil Mckee committed Jan 13, 2017
1 parent 22a4f9b commit 3f720fa
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
14 changes: 14 additions & 0 deletions docker_build/centos6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM centos:6
RUN echo "UPDATE" && yum -y update
RUN echo "DEVTOOLS" && yum -y groupinstall "Development Tools"
RUN echo "EXTRAS" && yum -y install \
git \
libpcap-devel \
libvirt-devel \
libnfnetlink-devel \
libxml2-devel \
rpm-build \
dbus-devel
RUN mkdir /packages && chown 777 /packages
COPY build_hsflowd /root/build_hsflowd
ENTRYPOINT ["/root/build_hsflowd"]
12 changes: 12 additions & 0 deletions docker_build/centos6/build_hsflowd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
echo "build_hsflowd on platform: $1"

git clone https://github.com/sflow/host-sflow \
&& cd host-sflow \
&& make rpm FEATURES="ULOG NFLOG PCAP DOCKER KVM OVS DBUS"

for rpm in `ls *.rpm`; do cp "$rpm" "/packages/${rpm/hsflowd/hsflowd-$1}"; done
echo ""
echo "files in /packages:"
ls -l /packages

2 changes: 1 addition & 1 deletion src/SunOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ endif
ifeq ($(JSON),yes)
JSONDIR=../json
CFLAGS += -DHSF_JSON -I$(JSONDIR)
LIBS += $(JSONDIR)/libjson.a -lm
LIBS += $(JSONDIR)/libcjson.a -lm
endif

#### BUILD ####
Expand Down
2 changes: 1 addition & 1 deletion src/SunOS/hsflowd.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ extern "C" {
void setApplicationPolling(HSPSFlowSettings *settings, char *app, uint32_t secs);
void clearApplicationSettings(HSPSFlowSettings *settings);
void lookupApplicationSettings(HSPSFlowSettings *settings, char *app, uint32_t *p_sampling, uint32_t *p_polling);
EnumIPSelectionPriority agentAddressPriority(HSP *sp, SFLAddress *addr, int vlan, int loopback);
uint32_t agentAddressPriority(HSP *sp, SFLAddress *addr, int vlan, int loopback);
int selectAgentAddress(HSP *sp);
void addAgentCIDR(HSPSFlowSettings *settings, HSPCIDR *cidr);
void clearAgentCIDRs(HSPSFlowSettings *settings);
Expand Down

0 comments on commit 3f720fa

Please sign in to comment.