GCC 12.2 portability issues

This commit is contained in:
Robin E. R. Davies
2025-06-27 06:09:41 -04:00
parent 96af9287ba
commit f0628c2cce
6 changed files with 15 additions and 5 deletions
+4 -1
View File
@@ -81,8 +81,11 @@ namespace pipedal
port.canReadSubscribe = capability & SND_SEQ_PORT_CAP_SUBS_READ;
port.canWriteSubscribe = capability & SND_SEQ_PORT_CAP_SUBS_WRITE;
auto typeBits = snd_seq_port_info_get_type(port_info);
#ifdef SND_SEQ_PORT_TYPE_MIDI_UMP
port.isUmp = (typeBits & SND_SEQ_PORT_TYPE_MIDI_UMP) != 0;
#else
port.isUmp = false; // UMP support is not available in all versions of ALSA
#endif
port.isSystemAnnounce = (typeBits & SND_SEQ_PORT_SYSTEM_ANNOUNCE) != 0;
port.isMidiSynth = (typeBits & SND_SEQ_PORT_TYPE_MIDI_GENERIC) != 0 ||
(typeBits & SND_SEQ_PORT_TYPE_MIDI_GM) != 0 ||
+2 -2
View File
@@ -44,9 +44,9 @@ std::string HtmlHelper::timeToHttpDate(std::filesystem::file_time_type time)
{
// Convert to time_t.
std::chrono::system_clock::time_point system_time = std::chrono::clock_cast<std::chrono::system_clock>(time);
auto sctp = std::chrono::time_point_cast<std::chrono::system_clock::duration>(time - std::filesystem::file_time_type::clock::now() + std::chrono::system_clock::now());
auto time_t_value = std::chrono::system_clock::to_time_t(system_time);
auto time_t_value = std::chrono::system_clock::to_time_t(sctp);
return timeToHttpDate(time_t_value);
}
+2
View File
@@ -35,6 +35,8 @@
#include <string_view>
#include <string.h>
#include <stdexcept>
#include <vector>
#include <memory>
#define DECLARE_JSON_MAP(CLASSNAME) \
static pipedal::json_map::storage_type<CLASSNAME> jmap
@@ -30,6 +30,7 @@
#include <string>
#include <stdexcept>
#include <utility>
#include <memory>
#include "json.hpp"
namespace pipedal