mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-03 12:07:57 +00:00
Fix build issues on OSX
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <vector>
|
||||||
#include <librdkafka/rdkafka.h>
|
#include <librdkafka/rdkafka.h>
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ set(SOURCES
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_library(cppkafka ${CPPKAFKA_LIBRARY_TYPE} ${SOURCES})
|
add_library(cppkafka ${CPPKAFKA_LIBRARY_TYPE} ${SOURCES})
|
||||||
|
target_link_libraries(cppkafka ${RDKAFKA_LIBRARY})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS cppkafka
|
TARGETS cppkafka
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void Configuration::set_socket_callback(SocketCallback callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Configuration::set_default_topic_configuration(optional<TopicConfiguration> config) {
|
void Configuration::set_default_topic_configuration(optional<TopicConfiguration> config) {
|
||||||
default_topic_config_ = move(config);
|
default_topic_config_ = std::move(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Configuration::has_property(const string& name) const {
|
bool Configuration::has_property(const string& name) const {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ optional<MessageTimestamp> Message::get_timestamp() const {
|
|||||||
rd_kafka_timestamp_type_t type = RD_KAFKA_TIMESTAMP_NOT_AVAILABLE;
|
rd_kafka_timestamp_type_t type = RD_KAFKA_TIMESTAMP_NOT_AVAILABLE;
|
||||||
int64_t timestamp = rd_kafka_message_timestamp(handle_.get(), &type);
|
int64_t timestamp = rd_kafka_message_timestamp(handle_.get(), &type);
|
||||||
if (timestamp == -1 || type == RD_KAFKA_TIMESTAMP_NOT_AVAILABLE) {
|
if (timestamp == -1 || type == RD_KAFKA_TIMESTAMP_NOT_AVAILABLE) {
|
||||||
return none_t();
|
return {};
|
||||||
}
|
}
|
||||||
return MessageTimestamp(timestamp, static_cast<MessageTimestamp::TimestampType>(type));
|
return MessageTimestamp(timestamp, static_cast<MessageTimestamp::TimestampType>(type));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user