Merge branch 'master' into pocsag

This commit is contained in:
Jonathan Naylor
2018-07-04 19:01:24 +01:00
8 changed files with 23 additions and 15 deletions

View File

@@ -48,6 +48,8 @@
#include <cstdio>
#include <vector>
#include <cstdlib>
#if !defined(_WIN32) && !defined(_WIN64)
#include <sys/types.h>
#include <unistd.h>
@@ -210,7 +212,7 @@ int CMMDVMHost::run()
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
#if !defined(HD44780) && !defined(OLED)
#if !defined(HD44780) && !defined(OLED) && !defined(_OPENWRT)
// If we are currently root...
if (getuid() == 0) {
struct passwd* user = ::getpwnam("mmdvm");
@@ -241,7 +243,7 @@ int CMMDVMHost::run()
}
}
#else
::fprintf(stderr, "Dropping root permissions in daemon mode is disabled with HD44780 display\n");
::fprintf(stderr, "Dropping root permissions in daemon mode is disabled.\n");
}
#endif
#endif