diff --git a/Makefile.am b/Makefile.am index eed4735..4a63875 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ glorytun_LDADD = $(libsodium_LIBS) glorytun_SOURCES = \ src/common.h \ src/common-static.h \ + src/common.c \ src/ip-static.h \ src/main.c \ src/option.c \ diff --git a/src/common.c b/src/common.c new file mode 100644 index 0000000..ea84c7a --- /dev/null +++ b/src/common.c @@ -0,0 +1,8 @@ +#include "common.h" + +#include + +void gt_not_available (const char *name) +{ + fprintf(stderr, "%s is not available on your platform!\n", name); +} diff --git a/src/common.h b/src/common.h index 4a0477c..d3c690d 100644 --- a/src/common.h +++ b/src/common.h @@ -24,3 +24,5 @@ struct buffer { uint8_t *write; uint8_t *end; }; + +void gt_not_available (const char *); diff --git a/src/main.c b/src/main.c index 88bd0c4..3d43317 100644 --- a/src/main.c +++ b/src/main.c @@ -43,11 +43,6 @@ struct crypto_ctx { volatile sig_atomic_t running; -static void gt_not_available (const char *name) -{ - fprintf(stderr, "%s is not available on your platform!\n", name); -} - static int64_t dt_ms (struct timeval *ta, struct timeval *tb) { const int64_t s = ta->tv_sec-tb->tv_sec;