Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for OpenWrt #49

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/openwrt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/conffile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "/tmp/run" is an implementation detail - the well defined dir to use is "/var/run"

#endif
#endif
#ifdef _WIN32
char basedir[1024];
Expand Down
Loading