crelay: Update to 0.10, refresh patches, remove daemon background call

Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
Ted Hess
2016-04-17 13:21:44 -04:00
parent bc9795a27f
commit 625a7e7563
5 changed files with 26 additions and 7 deletions
@@ -1,11 +1,11 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -45,7 +45,7 @@ endif
#ifdef DRV_SAINSMART
@@ -44,7 +44,7 @@ OPTS += -DDRV_CONRAD
endif
ifeq ($(DRV_SAINSMART), y)
SRC += relay_drv_sainsmart.c
-LIBS += -lftdi
+LIBS += -lftdi1
OPTS += -DDRV_SAINSMART
endif
#ifdef DRV_HIDAPI
ifeq ($(DRV_SAINSMART16), y)
@@ -1,6 +1,6 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -61,7 +61,7 @@ all: $(BIN)
@@ -64,7 +64,7 @@ all: $(BIN)
$(BIN): $(OBJ)
@echo "[Link $(BIN)] with libs $(LIBS)"
@@ -0,0 +1,15 @@
--- a/src/crelay.c
+++ b/src/crelay.c
@@ -678,10 +678,12 @@ int main(int argc, char *argv[])
listen(sock, 5);
syslog(LOG_DAEMON | LOG_NOTICE, "HTTP server listening on %s:%d\n", inet_ntoa(iface), port);
+#if 0
if (daemon(0, 0) == -1) {
syslog(LOG_DAEMON | LOG_ERR, "Failed to daemonize: %s", strerror(errno));
exit(EXIT_FAILURE);
}
+#endif
while (1)
{