fix build: Fix build in new docker
* Disable warnings via GCC diagnostic push * Add a few sys includes
This commit is contained in:
1 parent
bad703a847
commit
1b836b24a8
3 files changed
+15
-1
No files matched your search
@@ -103,11 +103,15 @@ std::string get_ice_clord_id_string(const MSG& msg)
|
||||
|
||||
inline void encode_corid(const char *channel, uint32_t sn, std::array<char, 17> &out) {
|
||||
memset(&out[0], ' ', out.size());
|
||||
auto ch_sz = std::min(strlen(channel), (size_t)5);
|
||||
#if defined(__GNUG__) && not defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
auto ch_sz = std::min(strlen(channel), (size_t)5);
|
||||
#endif
|
||||
strncpy(&out[0], channel, ch_sz);
|
||||
#if defined(__GNUG__) && not defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
out[ch_sz] = ':';
|
||||
auto sz_written = u32_toa(sn, &out[ch_sz + 1]);
|
||||
out[ch_sz+1+sz_written]=' ';
|
||||
|
||||
@@ -44,7 +44,14 @@ jetfix::FIXFragment::Bookmark<jetfix::fix::Text> static update_corid(
|
||||
jetfix::FIXFragment::Bookmark<jetfix::fix::Text> const &bm,
|
||||
jetfix::FIXFragment &encoding, trace::CorID const &cid) {
|
||||
std::array<char, corid_sz() + 1> buffer;
|
||||
#if defined(__GNUG__) && not defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
encode_corid(cid.channel, cid.sn, buffer);
|
||||
#if defined(__GNUG__) && not defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
return encoding.overwrite(bm, &buffer[0], corid_sz());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef _WIN32
|
||||
#include "CryptoInit.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <tbb/spin_mutex.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
Reference in new issue
Block a user