Add common.c
This commit is contained in:
8
src/common.c
Normal file
8
src/common.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void gt_not_available (const char *name)
|
||||
{
|
||||
fprintf(stderr, "%s is not available on your platform!\n", name);
|
||||
}
|
||||
@@ -24,3 +24,5 @@ struct buffer {
|
||||
uint8_t *write;
|
||||
uint8_t *end;
|
||||
};
|
||||
|
||||
void gt_not_available (const char *);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user