Skip to content

Commit

Permalink
Merge branch 'main' into p2p-peer-throttle
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiszczak authored Sep 7, 2023
2 parents 1eb1e44 + 061e79d commit 1983d90
Show file tree
Hide file tree
Showing 3 changed files with 839 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/libfc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ find_package(ZLIB REQUIRED)
target_include_directories(fc PUBLIC include)

# try and make this very clear that this json parser is intended only for webauthn parsing..
set_source_files_properties(src/crypto/elliptic_webauthn.cpp PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/include/fc/crypto/webauthn_json/include")
set_source_files_properties(src/crypto/elliptic_webauthn.cpp PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/fc/crypto/webauthn_json/include")

if(WIN32)
target_link_libraries( fc PUBLIC ws2_32 mswsock userenv )
Expand Down
8 changes: 6 additions & 2 deletions libraries/libfc/include/fc/io/cfile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
namespace fc {

namespace detail {
using unique_file = std::unique_ptr<FILE, decltype( &fclose )>;
inline void close_file(FILE* f) noexcept {
fclose(f);
}

using unique_file = std::unique_ptr<FILE, decltype( &close_file )>;
}

class cfile_datastream;
Expand All @@ -32,7 +36,7 @@ class cfile {
friend class temp_cfile;
public:
cfile()
: _file(nullptr, &fclose)
: _file(nullptr, &detail::close_file)
{}

cfile(cfile&& other)
Expand Down
Loading

0 comments on commit 1983d90

Please sign in to comment.