Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct includes #29

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@
!/configure
!/configure.ac
!/install-sh
!/Makefile.am
!/Makefile.in
!/snmp_bulkget.c
!/snmp_bulkget.h
!/utils.c
!/utils.h
!/check_interfaces.c
!/AUTHORS
!/NEWS
!/COPYING
!/config.guess
!/config.sub
!/missing
!/compile
!/ChangeLog
!/INSTALL
!/depcomp
!/README.md
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ ONBUILD ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y \
build-essential \
autoconf \
libsnmp-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN ./configure --libexecdir=/src \
COPY ./README.md ./README
RUN ls -R \
&& ./configure --libexecdir=/src \
&& make $target

FROM debian:stable-slim
ONBUILD ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y \
libsnmp30 \
libsnmp40 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=0 /src/check_interfaces /check_interfaces

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
AM_RECURSIVE_TARGETS = cscope
am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \
INSTALL NEWS README.md compile config.guess config.sub depcomp \
INSTALL NEWS README compile config.guess config.sub depcomp \
install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
Expand Down
9 changes: 9 additions & 0 deletions check_interfaces.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@


// This one is needed on FreeBSD and it has to be before the others or at least some of them
#include <getopt.h>


#include "snmp_bulkget.h"
#include "utils.h"
#include <net-snmp/net-snmp-config.h>
#include <stdbool.h>
#include <sys/time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

/*
* text strings to output in the perfdata
Expand Down