Skip to content

Commit

Permalink
Merge pull request #38 from marlinprotocol/build_fixes
Browse files Browse the repository at this point in the history
Build fixes
  • Loading branch information
roshanr95 committed Dec 25, 2020
2 parents 3f638fc + e09df96 commit f171f7e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions beacon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ target_link_libraries(beacon INTERFACE spdlog::spdlog_header_only)
# Boost::iterator
target_link_libraries(beacon INTERFACE Boost::iterator)

# Boost::filesystem
target_link_libraries(beacon INTERFACE Boost::filesystem)

install(TARGETS beacon
EXPORT marlin-beacon-export
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
2 changes: 1 addition & 1 deletion beacon/examples/crawler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <marlin/asyncio/core/EventLoop.hpp>
#include <cstring>
#include <fstream>
#include <experimental/filesystem>
#include <boost/filesystem.hpp>

#include "spdlog/fmt/bin_to_hex.h"

Expand Down
6 changes: 3 additions & 3 deletions beacon/examples/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <marlin/asyncio/core/EventLoop.hpp>
#include <cstring>
#include <fstream>
#include <experimental/filesystem>
#include <boost/filesystem.hpp>

#include "spdlog/fmt/bin_to_hex.h"

Expand Down Expand Up @@ -47,7 +47,7 @@ int main() {
uint8_t static_sk[crypto_box_SECRETKEYBYTES];
uint8_t static_pk[crypto_box_PUBLICKEYBYTES];

if(std::experimental::filesystem::exists("./.marlin/keys/static")) {
if(boost::filesystem::exists("./.marlin/keys/static")) {
std::ifstream sk("./.marlin/keys/static", std::ios::binary);
if(!sk.read((char *)static_sk, crypto_box_SECRETKEYBYTES)) {
throw;
Expand All @@ -56,7 +56,7 @@ int main() {
} else {
crypto_box_keypair(static_pk, static_sk);

std::experimental::filesystem::create_directories("./.marlin/keys/");
boost::filesystem::create_directories("./.marlin/keys/");
std::ofstream sk("./.marlin/keys/static", std::ios::binary);

sk.write((char *)static_sk, crypto_box_SECRETKEYBYTES);
Expand Down
2 changes: 1 addition & 1 deletion pubsub/include/marlin/pubsub/PubSubNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ void PUBSUBNODETYPE::send_message_on_channel(
uint16_t channel,
uint64_t message_id,
const uint8_t *data,
size_t size,
uint64_t size,
core::SocketAddress const *excluded,
MessageHeaderType prev_header
) {
Expand Down
3 changes: 3 additions & 0 deletions stream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ target_link_libraries(stream INTERFACE marlin::asyncio)
# spdlog
target_link_libraries(stream INTERFACE spdlog::spdlog_header_only)

# Boost::filesystem
target_link_libraries(stream INTERFACE Boost::filesystem)

install(TARGETS stream
EXPORT marlin-stream-export
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
6 changes: 3 additions & 3 deletions stream/examples/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <spdlog/spdlog.h>
#include <spdlog/fmt/bin_to_hex.h>
#include <fstream>
#include <experimental/filesystem>
#include <boost/filesystem.hpp>

using namespace marlin::core;
using namespace marlin::asyncio;
Expand Down Expand Up @@ -85,7 +85,7 @@ struct Delegate {
};

int main() {
if(std::experimental::filesystem::exists("./.marlin/keys/static")) {
if(boost::filesystem::exists("./.marlin/keys/static")) {
std::ifstream sk("./.marlin/keys/static", std::ios::binary);
if(!sk.read((char *)static_sk, crypto_box_SECRETKEYBYTES)) {
throw;
Expand All @@ -94,7 +94,7 @@ int main() {
} else {
crypto_box_keypair(static_pk, static_sk);

std::experimental::filesystem::create_directories("./.marlin/keys/");
boost::filesystem::create_directories("./.marlin/keys/");
std::ofstream sk("./.marlin/keys/static", std::ios::binary);

sk.write((char *)static_sk, crypto_box_SECRETKEYBYTES);
Expand Down
6 changes: 3 additions & 3 deletions stream/examples/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <spdlog/spdlog.h>
#include <spdlog/fmt/bin_to_hex.h>
#include <fstream>
#include <experimental/filesystem>
#include <boost/filesystem.hpp>

using namespace marlin::core;
using namespace marlin::asyncio;
Expand Down Expand Up @@ -85,7 +85,7 @@ struct Delegate {
};

int main() {
if(std::experimental::filesystem::exists("./.marlin/keys/static")) {
if(boost::filesystem::exists("./.marlin/keys/static")) {
std::ifstream sk("./.marlin/keys/static", std::ios::binary);
if(!sk.read((char *)static_sk, crypto_box_SECRETKEYBYTES)) {
throw;
Expand All @@ -94,7 +94,7 @@ int main() {
} else {
crypto_box_keypair(static_pk, static_sk);

std::experimental::filesystem::create_directories("./.marlin/keys/");
boost::filesystem::create_directories("./.marlin/keys/");
std::ofstream sk("./.marlin/keys/static", std::ios::binary);

sk.write((char *)static_sk, crypto_box_SECRETKEYBYTES);
Expand Down

0 comments on commit f171f7e

Please sign in to comment.