0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-05 01:36:58 +00:00
termux-packages/packages/golang/patch-script/fix-hardcoded-etc-resolv-conf.sh
Biswapriyo Nath a6786138f2
fix(main/golang): Workaround crash due to pidfd_open syscall (#21266)
Co-authored-by: Chongyun Lee <45286352+licy183@users.noreply.github.com>
2024-08-28 01:01:48 +08:00

13 lines
417 B
Bash

for f in src/net/conf_android.go src/net/dnsclient_android.go; do
if [ -e "${f}" ]; then
termux_error_exit "Error: file ${f} already exists."
fi
done
cp -T src/net/conf.go src/net/conf_android.go
cp -T src/net/dnsclient_unix.go src/net/dnsclient_android.go
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" \
${TERMUX_SCRIPTDIR}/packages/golang/patch-script/fix-hardcoded-etc-resolv-conf.diff \
| patch --silent -p1