summaryrefslogtreecommitdiff
path: root/llmnrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'llmnrd.c')
-rw-r--r--llmnrd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/llmnrd.c b/llmnrd.c
index ff70ff8..442a600 100644
--- a/llmnrd.c
+++ b/llmnrd.c
@@ -18,6 +18,7 @@
* along with llmnrd. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <errno.h>
#include <getopt.h>
#include <signal.h>
#include <stdbool.h>
@@ -149,7 +150,10 @@ int main(int argc, char **argv)
}
if (daemonize) {
- /* TODO */
+ if (daemon(0, 0) != 0) {
+ log_err("Failed to daemonize process: %s\n", strerror(errno));
+ return EXIT_FAILURE;
+ }
}
if (iface_start_thread() < 0)
.c:34:5: warning: no previous prototype for 'mtk_regmap_write' [-Wmissing-prototypes] int mtk_regmap_write(struct regmap *map, int reg, unsigned int val) In fact, all of those functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks it 'static'. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')