From 5e797ed2c3e0324b55c2e5fa47548e50faefeb07 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 10 Oct 2018 10:36:24 +1000 Subject: [PATCH 1/5] change egcc to cc for FreeBSD --- src/GNUmakefile.freebsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GNUmakefile.freebsd b/src/GNUmakefile.freebsd index a21f66d..30ed892 100644 --- a/src/GNUmakefile.freebsd +++ b/src/GNUmakefile.freebsd @@ -1,4 +1,4 @@ -CC:= egcc +CC:= cc CFLAGS:= -std=gnu99 -I/usr/local/include LIBS:= -L/usr/local/lib -lsqlite3 -lutil -lm -lssl -lcrypto -lssh -liconv -lmosquitto From f70565325ec7cd60104dd3e4fad9d63f86274270 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 10 Oct 2018 11:12:04 +1000 Subject: [PATCH 2/5] fix bug in new ptr vector append --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 4f846db..c25baa0 100644 --- a/src/util.c +++ b/src/util.c @@ -140,8 +140,8 @@ int ptr_vector_append(struct ptr_vector *vec, void *p) { vec->capacity *= 2; ps = realloc(vec->ptrs, vec->capacity * sizeof(void *)); assert(ps != NULL); - memset(vec->ptrs + oldcap, 0, (vec->capacity - oldcap) * sizeof(void *)); vec->ptrs = ps; + memset(vec->ptrs + oldcap, 0, (vec->capacity - oldcap) * sizeof(void *)); } vec->ptrs[vec->len] = p; ++vec->len; From 38ace586681645e227f6ba1daedc569bfe153b68 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 10 Oct 2018 11:22:38 +1000 Subject: [PATCH 3/5] fix build script --- src/GNUmakefile.common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GNUmakefile.common b/src/GNUmakefile.common index cf0f92d..1d958f8 100644 --- a/src/GNUmakefile.common +++ b/src/GNUmakefile.common @@ -14,6 +14,8 @@ UUID:= ${DEPSDIR}/libuuid/.libs/libuuid.a all: magicka magimail magiedit ticproc mgpost magichat \ filecenter dosbox_shim magiftpd reset_pass +www: magickawww magimail magiedit ticproc mgpost magichat \ + filecenter dosbox_shim magiftpd reset_pass ${LUA}: cd ${DEPSDIR}/lua && ${MAKE} -f Makefile ${DEPS_LUA_TARGET} MAKEFLAGS= CC=${CC} @@ -59,7 +61,7 @@ endif %.o: %.c ${HDRS} ${CC} -c -o $@ $< ${CFLAGS} -www: ${OBJS} ${WWWOBJS} ${LUA} ${ZMODEM} ${B64} ${JAMLIB} ${JSMN} ${UUID} +magickawww: ${OBJS} ${WWWOBJS} ${LUA} ${ZMODEM} ${B64} ${JAMLIB} ${JSMN} ${UUID} ${CC} -o ../magicka $^ ${LIBS} -lmicrohttpd magicka: ${OBJS} ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} ${UUID} From dd1b386ff85b87047b2772ee0362b08e26f704ce Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 10 Oct 2018 11:30:01 +1000 Subject: [PATCH 4/5] fix the makefile fix --- src/GNUmakefile.common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GNUmakefile.common b/src/GNUmakefile.common index 1d958f8..49afb3b 100644 --- a/src/GNUmakefile.common +++ b/src/GNUmakefile.common @@ -14,6 +14,7 @@ UUID:= ${DEPSDIR}/libuuid/.libs/libuuid.a all: magicka magimail magiedit ticproc mgpost magichat \ filecenter dosbox_shim magiftpd reset_pass + www: magickawww magimail magiedit ticproc mgpost magichat \ filecenter dosbox_shim magiftpd reset_pass @@ -95,7 +96,7 @@ magiftpd: reset_pass: cd ${UTILSDIR}/reset_pass && ${MAKE} -.PHONY: clean +.PHONY: clean www clean: rm -f ${OBJS} ${WWWOBJS} ../magicka From d80037d30e0ab78c0dd0eb65437c91eee8d8c058 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 10 Oct 2018 11:47:09 +1000 Subject: [PATCH 5/5] build magimail --- src/GNUmakefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GNUmakefile.common b/src/GNUmakefile.common index 49afb3b..d439b45 100644 --- a/src/GNUmakefile.common +++ b/src/GNUmakefile.common @@ -73,7 +73,7 @@ magiedit: ${ODOORS} cd ${UTILSDIR}/magiedit && ${MAKE} magimail: ${JAMLIB} - cd ${UTILSDIR}/magimail && ${MAKE} + cd ${UTILSDIR}/magimail && ${MAKE} all ticproc: cd ${UTILSDIR}/ticproc && ${MAKE}