Skip to content

Commit

Permalink
[mdns] replace the source of mDNSResponder (#1592)
Browse files Browse the repository at this point in the history
  • Loading branch information
superwhd authored Nov 3, 2022
1 parent 7dd72ee commit 22d4f4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ install_packages_apt()
sudo apt-get install --no-install-recommends -y libavahi-client3 libavahi-common-dev libavahi-client-dev avahi-daemon
(MDNS_RESPONDER_SOURCE_NAME=mDNSResponder-1310.80.1 \
&& cd /tmp \
&& wget -4 --no-check-certificate https://opensource.apple.com/tarballs/mDNSResponder/$MDNS_RESPONDER_SOURCE_NAME.tar.gz \
&& tar xvf $MDNS_RESPONDER_SOURCE_NAME.tar.gz \
&& wget -4 --no-check-certificate https://github.com/apple-oss-distributions/mDNSResponder/archive/refs/tags/$MDNS_RESPONDER_SOURCE_NAME.tar.gz \
&& mkdir -p $MDNS_RESPONDER_SOURCE_NAME \
&& tar xvf $MDNS_RESPONDER_SOURCE_NAME.tar.gz -C $MDNS_RESPONDER_SOURCE_NAME --strip-components=1 \
&& cd /tmp/$MDNS_RESPONDER_SOURCE_NAME/Clients \
&& sed -i '/#include <ctype.h>/a #include <stdarg.h>' dns-sd.c \
&& sed -i '/#include <ctype.h>/a #include <sys/param.h>' dns-sd.c \
Expand Down
5 changes: 3 additions & 2 deletions tests/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ case "$(uname)" in

if [ "${OTBR_MDNS-}" == 'mDNSResponder' ]; then
SOURCE_NAME=mDNSResponder-1310.80.1
wget https://opensource.apple.com/tarballs/mDNSResponder/$SOURCE_NAME.tar.gz \
&& tar xvf $SOURCE_NAME.tar.gz \
wget https://github.com/apple-oss-distributions/mDNSResponder/archive/refs/tags/$SOURCE_NAME.tar.gz \
&& mkdir -p $SOURCE_NAME \
&& tar xvf $SOURCE_NAME.tar.gz -C $SOURCE_NAME --strip-components=1 \
&& cd $SOURCE_NAME/Clients \
&& sed -i '/#include <ctype.h>/a #include <stdarg.h>' dns-sd.c \
&& sed -i '/#include <ctype.h>/a #include <sys/param.h>' dns-sd.c \
Expand Down
5 changes: 3 additions & 2 deletions tests/scripts/check-android-build
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,9 @@ prepare_libmdnssd()

[[ ${OTBR_MDNS} == mDNSResponder ]] || return 0

wget --tries 4 --no-check-certificate --quiet "https://opensource.apple.com/tarballs/mDNSResponder/${MDNSRESPONDER_SOURCE}.tar.gz"
tar xvf "${MDNSRESPONDER_SOURCE}.tar.gz"
wget --tries 4 --no-check-certificate --quiet "https://github.com/apple-oss-distributions/mDNSResponder/archive/refs/tags/${MDNSRESPONDER_SOURCE}.tar.gz"
mkdir -p ${MDNSRESPONDER_SOURCE}
tar xvf "${MDNSRESPONDER_SOURCE}.tar.gz" -C ${MDNSRESPONDER_SOURCE} --strip-components=1
cat >"${MDNSRESPONDER_SOURCE}/Android.mk" <<EOF
LOCAL_PATH:= \$(call my-dir)
Expand Down

0 comments on commit 22d4f4e

Please sign in to comment.