Fix build errors on some compilers due to missing symbols.

This commit is contained in:
Jordan Bancino 2023-04-20 19:19:23 +00:00
parent ec09882dbe
commit 0b7282c36a
6 changed files with 3 additions and 69 deletions

View file

@ -352,9 +352,6 @@ Field;Type;Description
memory_allocated;Integer;T{
The total amount of memory allocated, measured in bytes.
T}
uptime;Integer;T{
The total uptime of the server process, measured in milliseconds.
T}
version;String;T{
The current version of Telodendria.
T}

View file

@ -53,25 +53,6 @@
static Array *httpServers;
static volatile int restart;
static unsigned long startTs;
void
Restart(void)
{
raise(SIGUSR1);
}
void
Shutdown(void)
{
raise(SIGINT);
}
unsigned long
Uptime(void)
{
return UtilServerTs() - startTs;
}
static void
SignalHandler(int signal)
@ -156,8 +137,6 @@ start:
groupInfo = NULL;
cron = NULL;
startTs = UtilServerTs();
memset(&matrixArgs, 0, sizeof(matrixArgs));
if (!LogConfigGlobal())

View file

@ -24,7 +24,6 @@
#include <Routes.h>
#include <User.h>
#include <Main.h>
#include <Memory.h>
#include <string.h>

View file

@ -24,7 +24,6 @@
#include <Routes.h>
#include <User.h>
#include <Main.h>
#include <Memory.h>
#include <string.h>

View file

@ -24,10 +24,10 @@
#include <Routes.h>
#include <User.h>
#include <Main.h>
#include <Memory.h>
#include <string.h>
#include <signal.h>
ROUTE_IMPL(RouteProcControl, path, argp)
{
@ -63,11 +63,11 @@ ROUTE_IMPL(RouteProcControl, path, argp)
case HTTP_POST:
if (strcmp(op, "restart") == 0)
{
Restart();
raise(SIGUSR1);
}
else if (strcmp(op, "shutdown") == 0)
{
Shutdown();
raise(SIGINT);
}
else
{
@ -83,7 +83,6 @@ ROUTE_IMPL(RouteProcControl, path, argp)
HashMapSet(response, "version", JsonValueString(TELODENDRIA_VERSION));
HashMapSet(response, "memory_allocated", JsonValueInteger(MemoryAllocated()));
HashMapSet(response, "uptime", JsonValueInteger(Uptime()));
goto finish;
}

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2022-2023 Jordan Bancino <@jordan:bancino.net>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef TELODENDRIA_MAIN_H
#define TELODENDRIA_MAIN_H
extern void
Restart(void);
extern void
Shutdown(void);
extern unsigned long
Uptime(void);
extern int
main(int argc, char **argv);
#endif /* TELODENDRIA_MAIN_H */