1#!/bin/bash -eu 2# Copyright 2019 Google Inc. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16################################################################################ 17 18 19sed -i 's/check_inconsistencies=yes/check_inconsistencies=no/' common/acx_pthread.m4 20sed -i 's/avahiinclude_HEADERS =/avahiinclude_HEADERS = dns.h hashmap.h/' avahi-core/Makefile.am 21 22./autogen.sh --disable-stack-protector --disable-qt3 --disable-qt4 --disable-qt5 --disable-gtk --disable-gtk3 --disable-dbus --disable-gdbm --disable-libdaemon --disable-python --disable-manpages --disable-mono --disable-monodoc --disable-glib --disable-gobject --disable-libevent --prefix="$WORK" 23make -j "$(nproc)" 24make install 25 26$CXX $CXXFLAGS -std=c++11 "-I$WORK/include/" \ 27 "$SRC/avahi_packet_consume_record_fuzzer.cc" \ 28 -o "$OUT/avahi_packet_consume_record_fuzzer" \ 29 $LIB_FUZZING_ENGINE \ 30 "$WORK/lib/libavahi-core.a" "$WORK/lib/libavahi-common.a" 31 32$CXX $CXXFLAGS -std=c++11 "-I$WORK/include/" \ 33 "$SRC/avahi_packet_consume_key_fuzzer.cc" \ 34 -o "$OUT/avahi_packet_consume_key_fuzzer" \ 35 $LIB_FUZZING_ENGINE \ 36 "$WORK/lib/libavahi-core.a" "$WORK/lib/libavahi-common.a" 37