Skip to content

Commit

Permalink
Merge pull request #683 from vaygr/openbsd-build
Browse files Browse the repository at this point in the history
fixed build with OpenBSD
  • Loading branch information
orignal committed Oct 22, 2016
2 parents 25c1884 + 87a85ff commit c40a463
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DaemonLinux.cpp
Expand Up @@ -75,10 +75,12 @@ namespace i2p
return false;
}

#if !defined(__OpenBSD__)
// point std{in,out,err} descriptors to /dev/null
stdin = freopen("/dev/null", "r", stdin);
stdout = freopen("/dev/null", "w", stdout);
stderr = freopen("/dev/null", "w", stderr);
#endif
}

// Pidfile
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -21,7 +21,7 @@ ifeq ($(UNAME),Darwin)
else
include Makefile.osx
endif
else ifeq ($(shell echo $(UNAME) | $(GREP) -c FreeBSD),1)
else ifeq ($(shell echo $(UNAME) | $(GREP) -Ec '(Free|Open)BSD'),1)
DAEMON_SRC += DaemonLinux.cpp
include Makefile.bsd
else ifeq ($(UNAME),Linux)
Expand Down

0 comments on commit c40a463

Please sign in to comment.