From 55d290a3bfeff7d7fdcc43430663da9600b81e7e Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 29 Jun 2012 20:58:32 +0100 Subject: [PATCH] Handle pid-file location in Android. --- src/config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config.h b/src/config.h index 84025f7..4a9fa2c 100644 --- a/src/config.h +++ b/src/config.h @@ -33,7 +33,6 @@ #define SMALLDNAME 40 /* most domain names are smaller than this */ #define HOSTSFILE "/etc/hosts" #define ETHERSFILE "/etc/ethers" -#define RUNFILE "/var/run/dnsmasq.pid" #define DEFLEASE 3600 /* default lease time, 1 hour */ #define CHUSER "nobody" #define CHGRP "dip" @@ -158,7 +157,13 @@ RESOLVFILE # endif #endif - +#ifndef RUNFILE +# if defined(__ANDROID__) +# define RUNFILE "/data/dnsmasq.pid" +# else +# define RUNFILE "/var/run/dnsmasq.pid" +# endif +#endif /* platform dependent options: these are determined automatically below