mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-18 01:08:51 +00:00
feature/freebsd-support-one: main freebsd adjustments
This commit is contained in:
@ -17,6 +17,11 @@
|
||||
|
||||
#include "events.h"
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
enum class PluginEventSifterResult {
|
||||
Accept,
|
||||
|
@ -143,7 +143,7 @@ class WSConnection : NonCopyable {
|
||||
hubTrigger->setData(&asyncCb);
|
||||
|
||||
hubTrigger->start([](uS::Async *a){
|
||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
||||
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||
(*r)();
|
||||
});
|
||||
|
||||
|
@ -391,7 +391,7 @@ struct Router {
|
||||
hubTrigger->setData(&asyncCb);
|
||||
|
||||
hubTrigger->start([](uS::Async *a){
|
||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
||||
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||
(*r)();
|
||||
});
|
||||
|
||||
|
@ -223,7 +223,7 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
||||
hubTrigger->setData(&asyncCb);
|
||||
|
||||
hubTrigger->start([](uS::Async *a){
|
||||
auto *r = static_cast<std::function<void()> *>(a->data);
|
||||
auto *r = static_cast<std::function<void()> *>(a->getData());
|
||||
(*r)();
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -69,5 +69,10 @@ static void setRLimits() {
|
||||
void onAppStartup(lmdb::txn &txn, const std::string &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();
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user