diff --git a/packages/openwrt/Makefile b/packages/openwrt/Makefile index 31c2e65b..318cf04e 100644 --- a/packages/openwrt/Makefile +++ b/packages/openwrt/Makefile @@ -32,7 +32,6 @@ define Package/n3n/Default TITLE:=N2N Peer-to-peer VPN URL:=http://github.com/n42n/n3n SUBMENU:=VPN - DEPENDS+=+libcap endef define Package/n3n-edge @@ -57,7 +56,7 @@ endef define Build/Configure ( cd $(PKG_BUILD_DIR); \ ./autogen.sh; \ - LDFLAGS=--static ./configure ) + LDFLAGS=--static ./configure CFLAGS="-DBUILD_OPENWRT" ) endef define Package/n3n-edge/conffiles diff --git a/src/conffile.c b/src/conffile.c index f8b36d56..c7eee477 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -1383,7 +1383,11 @@ int n3n_config_setup_sessiondir (n2n_edge_conf_t *conf) { #ifndef _WIN32 +#ifndef BUILD_OPENWRT char *basedir = "/run/n3n"; +#else + char *basedir = "/tmp/run/n3n"; +#endif #endif #ifdef _WIN32 char basedir[1024];