tlsgate

TLS reverse proxy
git clone git://git.akobets.xyz/tlsgate
Log | Files | Refs | README | LICENSE

commit ab2ab6e3e97078dc249ab6b839fd4b69ae53221d
parent d70e99a0e0eaadb4c064bbab18cbcf396d9596b8
Author: Artem Kobets <artem@akobets.xyz>
Date:   Thu,  3 Sep 2020 00:09:35 +0300

build tweaks, add prototypes

Diffstat:
MMakefile | 9+++++----
Mmain.c | 8++++----
Msock.c | 1+
3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,8 +5,10 @@ MANPREFIX = $(PREFIX)/share/man LIBS = -ltls -ALL_CPPFLAGS = -D_POSIX_C_SOURCE=200809L $(CPPFLAGS) -ALL_CFLAGS = -std=c99 -pedantic -Wall $(CFLAGS) +ALL_CFLAGS = -std=c99 -pedantic -Wall \ + -Wmissing-prototypes -Wstrict-prototypes \ + -D_POSIX_C_SOURCE=200809L \ + $(CFLAGS) $(CPPFLAGS) ALL_LDFLAGS = $(LIBS) $(LDFLAGS) CC = cc @@ -19,7 +21,7 @@ HDR = serve.h sock.h util.h all: tlsgate .c.o: - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) -c $< -o $@ + $(CC) $(ALL_CFLAGS) -c $< -o $@ $(OBJ): $(HDR) tlsgate: $(OBJ) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $(OBJ) @@ -30,7 +32,6 @@ clean: install: tlsgate mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f tlsgate $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/tlsgate mkdir -p $(DESTDIR)$(MANPREFIX)/man1 cp -f tlsgate.1 $(DESTDIR)$(MANPREFIX)/man1 diff --git a/main.c b/main.c @@ -18,18 +18,18 @@ #define SOCK_TIMEOUT_SECS 30 static void sigchld(int unused); -static void usage(); +static void usage(void); static char *argv0; -void +static void sigchld(int unused) { while (wait(NULL) != -1); } -void -usage() +static void +usage(void) { die( "usage: %s -c cert -k key [-C ca]\n" diff --git a/sock.c b/sock.c @@ -10,6 +10,7 @@ #include <netdb.h> #include <sys/un.h> +#include "sock.h" #include "util.h" int