aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar DavidKorczynski <david@adalogics.com>2021-08-16 17:08:15 +0100
committerGravatar GitHub <noreply@github.com>2021-08-16 16:08:15 +0000
commit428e88df5fa1b4637e58318ce3f56ac71523fd06 (patch)
treeae21ecae0613f42bf410ccb9ea7765b7e65c5513
parent3ca919279a1d3f0d809d30e118c20ea1009ef175 (diff)
net-snmp: fix build. (#6229)
-rw-r--r--projects/net-snmp/Dockerfile2
-rwxr-xr-xprojects/net-snmp/build.sh6
2 files changed, 5 insertions, 3 deletions
diff --git a/projects/net-snmp/Dockerfile b/projects/net-snmp/Dockerfile
index 72dfa667..4a81ee31 100644
--- a/projects/net-snmp/Dockerfile
+++ b/projects/net-snmp/Dockerfile
@@ -15,7 +15,7 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-RUN apt-get update && apt-get install -y make autoconf libtool libssl-dev
+RUN apt-get update && apt-get install -y pkg-config make autoconf libtool libssl-dev libnl-genl-3-dev libnl-3-dev libnl-route-3-dev
RUN git clone https://github.com/net-snmp/net-snmp net-snmp
WORKDIR net-snmp
COPY build.sh $SRC/
diff --git a/projects/net-snmp/build.sh b/projects/net-snmp/build.sh
index fcd9a4ac..069b1da6 100755
--- a/projects/net-snmp/build.sh
+++ b/projects/net-snmp/build.sh
@@ -15,8 +15,10 @@
#
################################################################################
-# build project
-./configure --with-openssl=/usr --with-defaults --with-logfile="/dev/null" --with-persistent-directory="/dev/null"
+sed -i 's/#define NETSNMP_SELECT_TIMEVAL ${arg_type}/#define NETSNMP_SELECT_TIMEVAL struct timeval/g' ./configure
+rm testing/fuzzing/build.sh && echo "echo 0" >> testing/fuzzing/build.sh && chmod +x ./testing/fuzzing/build.sh
+
+./configure --with-nl --with-openssl=/usr --with-defaults --disable-mibs --with-logfile="/dev/null" --with-persistent-directory="/dev/null" --with-out-mib-modules="mibII,if-mib"
# net-snmp build is not parallel-make safe; do not add -j
make