mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 01:34:57 +00:00
feature/freebsd-support-one: main freebsd adjustments
This commit is contained in:
@ -17,6 +17,11 @@
|
|||||||
|
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
extern char **environ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum class PluginEventSifterResult {
|
enum class PluginEventSifterResult {
|
||||||
Accept,
|
Accept,
|
||||||
|
@ -143,7 +143,7 @@ class WSConnection : NonCopyable {
|
|||||||
hubTrigger->setData(&asyncCb);
|
hubTrigger->setData(&asyncCb);
|
||||||
|
|
||||||
hubTrigger->start([](uS::Async *a){
|
hubTrigger->start([](uS::Async *a){
|
||||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||||
(*r)();
|
(*r)();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ struct Router {
|
|||||||
hubTrigger->setData(&asyncCb);
|
hubTrigger->setData(&asyncCb);
|
||||||
|
|
||||||
hubTrigger->start([](uS::Async *a){
|
hubTrigger->start([](uS::Async *a){
|
||||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||||
(*r)();
|
(*r)();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
|||||||
hubTrigger->setData(&asyncCb);
|
hubTrigger->setData(&asyncCb);
|
||||||
|
|
||||||
hubTrigger->start([](uS::Async *a){
|
hubTrigger->start([](uS::Async *a){
|
||||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||||
(*r)();
|
(*r)();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
@ -69,5 +69,10 @@ static void setRLimits() {
|
|||||||
void onAppStartup(lmdb::txn &txn, const std::string &cmd) {
|
void onAppStartup(lmdb::txn &txn, const std::string &cmd) {
|
||||||
dbCheck(txn, cmd);
|
dbCheck(txn, cmd);
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
|
// XXX - strfry error: Unable to set NOFILES limit to 1000000, exceeds max of 116991
|
||||||
|
// XXX - warning: comparison of integer expressions of different signedness:
|
||||||
|
// XXX 'const uint64_t' {aka 'const long unsigned int'} and 'rlim_t' {aka 'long int'} [-Wsign-compare]
|
||||||
setRLimits();
|
setRLimits();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user