Skip to content

Commit

Permalink
Update for OpenWrt
Browse files Browse the repository at this point in the history
  • Loading branch information
small-5 committed Aug 1, 2024
1 parent 4b19a27 commit 2601586
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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";
#endif
#endif
#ifdef _WIN32
char basedir[1024];
Expand Down

0 comments on commit 2601586

Please sign in to comment.