1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

some tiny fixes

This commit is contained in:
Desour 2024-10-06 15:13:51 +02:00
parent cc56fb8d29
commit acdb29805b
5 changed files with 9 additions and 12 deletions

View file

@ -22,7 +22,7 @@
For Debian/Ubuntu users:
sudo apt install g++ make libc6-dev cmake linux-libc-dev libpng-dev libjpeg-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
sudo apt install g++ make libc6-dev cmake linux-libc-dev libpng-dev libjpeg-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
For Fedora users:

View file

@ -1,7 +1,7 @@
/*
Minetest
Copyright (C) 2022 DS
Copyright (C) 2022 TurkeyMcMac, Jude Melton-Houghton <jwmhjwmh@gmail.com>
Copyright (C) 2024 DS
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "ipc_channel.h"
#include "debug.h"
#include "exceptions.h"
#include "porting.h"
#include <cerrno>
#include <utility>
@ -179,7 +180,7 @@ static bool wait_in(IPCChannelEnd::Dir *dir, u64 timeout_ms_abs)
u64 timeout_ms = timeout_ms_abs - tnow;
#elif defined(IPC_CHANNEL_IMPLEMENTATION_POSIX)
// Absolute time
u64 timeout_msu = timeout_ms_abs;
u64 timeout_ms = timeout_ms_abs;
#endif
timeout.tv_sec = timeout_ms / 1000;
timeout.tv_nsec = timeout_ms % 1000 * 1000000UL;
@ -200,13 +201,13 @@ static void post_out(IPCChannelEnd::Dir *dir)
}
template <typename T>
static inline void write_once(volatile T *var, const T val)
static void write_once(volatile T *var, const T val)
{
*var = val;
}
template <typename T>
static inline T read_once(const volatile T *var)
static T read_once(const volatile T *var)
{
return *var;
}

View file

@ -1,7 +1,7 @@
/*
Minetest
Copyright (C) 2022 DS
Copyright (C) 2022 TurkeyMcMac, Jude Melton-Houghton <jwmhjwmh@gmail.com>
Copyright (C) 2024 DS
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -237,8 +237,8 @@ public:
// Get the content of the last received message
// TODO: u8 *, or string_view?
inline const void *getRecvData() const noexcept { return m_large_recv.data(); }
inline size_t getRecvSize() const noexcept { return m_recv_size; }
const void *getRecvData() const noexcept { return m_large_recv.data(); }
size_t getRecvSize() const noexcept { return m_recv_size; }
private:
IPCChannelEnd(std::unique_ptr<IPCChannelResources> resources, Dir dir) :

View file

@ -6,9 +6,6 @@
#include <atomic>
#include <iostream>
#if defined(IPC_CHANNEL_IMPLEMENTATION_WIN32)
#include <windows.h>
#endif
#include "threading/ipc_channel.h"
#include "threading/semaphore.h"
#include "threading/thread.h"

View file

@ -9,7 +9,6 @@
#include "exceptions.h"
#include "threading/mutex_auto_lock.h"
#include "threading/semaphore.h"
#include "debug.h"
#include <list>
#include <vector>
#include <map>