Skip to content

Commit

Permalink
Move pcapplusplus build.sh upstream (#11198)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura authored Nov 10, 2023
1 parent d39f66c commit 245e013
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 1 addition & 23 deletions projects/pcapplusplus/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,4 @@
#
################################################################################

TARGETS_DIR=build/

# Build libpcap
cd $SRC/libpcap/
./autogen.sh
./configure --enable-shared=no
make -j$(nproc)

# Build PcapPlusPlus linking statically against the built libpcap
cd $SRC/PcapPlusPlus
LIBPCAP_PATH=$SRC/libpcap/
cmake -DPCAPPP_BUILD_FUZZERS=ON -DPCAPPP_BUILD_TESTS=OFF -DPCAPPP_BUILD_EXAMPLES=OFF -DPCAP_INCLUDE_DIR="${LIBPCAP_PATH}/" -DPCAP_LIBRARY="${LIBPCAP_PATH}/libpcap.a" -S . -B $TARGETS_DIR
cmake --build $TARGETS_DIR -j

# Copy target and options
cp $TARGETS_DIR/Tests/Fuzzers/FuzzTarget $OUT
cp $(ldd $OUT/FuzzTarget | cut -d" " -f3) $OUT
cp $SRC/default.options $OUT/FuzzTarget.options

# Copy corpora
cd $SRC/tcpdump
zip -jr FuzzTarget_seed_corpus.zip tests/*.pcap
cp FuzzTarget_seed_corpus.zip $OUT/
$SRC/PcapPlusPlus/Tests/Fuzzers/ossfuzz.sh
2 changes: 0 additions & 2 deletions projects/pcapplusplus/default.options

This file was deleted.

0 comments on commit 245e013

Please sign in to comment.