--- a/configure.ac
+++ b/configure.ac
@@ -1004,7 +1004,7 @@
 #
 # Avahi runtime dir
 #
-avahi_runtime_dir="/run"
+avahi_runtime_dir="@TERMUX_PREFIX@/var/run"
 avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
 AC_SUBST(avahi_runtime_dir)
 AC_SUBST(avahi_socket)
