diff --git a/Makefile b/Makefile index 42a53a4e..d27767fd 100644 --- a/Makefile +++ b/Makefile @@ -248,6 +248,7 @@ clean: $(RMRF) $(BUILD_DIR) $(eval version=$(shell grep "define CIVETWEB_VERSION" include/civetweb.h | sed 's|.*VERSION "\(.*\)"|\1|g')) $(eval major=$(shell echo $(version) | cut -d'.' -f1)) + $(RMRF) lib$(CPROG).a $(RMRF) lib$(CPROG).so $(RMRF) lib$(CPROG).so.$(major) $(RMRF) lib$(CPROG).so.$(version).0 diff --git a/examples/embedded_c/Makefile b/examples/embedded_c/Makefile index 1478a90b..665bdc8b 100644 --- a/examples/embedded_c/Makefile +++ b/examples/embedded_c/Makefile @@ -12,7 +12,7 @@ SRC = embedded_c.c TOP = ../.. CIVETWEB_LIB = libcivetweb.a -CFLAGS = -I$(TOP)/include $(COPT) -DUSE_WEBSOCKET +CFLAGS = -I$(TOP)/include $(COPT) -DUSE_WEBSOCKET -DUSE_IPV6 LIBS = -lpthread include $(TOP)/resources/Makefile.in-os diff --git a/examples/embedded_c/embedded_c.c b/examples/embedded_c/embedded_c.c index 4294f630..57e0f590 100644 --- a/examples/embedded_c/embedded_c.c +++ b/examples/embedded_c/embedded_c.c @@ -17,7 +17,7 @@ #define DOCUMENT_ROOT "." #ifdef USE_IPV6 -#define PORT "8888,[::]:8888" +#define PORT "8888,[::]:8886" #else #define PORT "8888" #endif @@ -251,7 +251,7 @@ int main(int argc, char *argv[]) struct mg_callbacks callbacks; struct mg_context *ctx; struct mg_server_ports ports[32]; - size_t port_cnt, n; + int port_cnt, n; memset(&callbacks, 0, sizeof(callbacks)); ctx = mg_start(&callbacks, 0, options); @@ -282,6 +282,7 @@ int main(int argc, char *argv[]) memset(ports, 0, sizeof(ports)); port_cnt = mg_get_server_ports(ctx, 32, ports); + printf("\n%i listening ports:\n\n", port_cnt); for (n=0; n