Skip to content

Commit 05d5a04

Browse files
authored
Merge pull request #47 from accelerated/master
Fixed deprecated error function call
2 parents df12b5f + 3d1402f commit 05d5a04

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Diff for: README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ If you have installed _librdkafka_ on a non standard directory, you can use the
7676
cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir
7777
```
7878

79-
Note that finding _librdkafka_ will succeed iff there's an _include_ and _lib_
80-
directories inside the specified path, including both the _rdkafka.h_ header
81-
and the _librdkafka_ library file.
79+
Note that the `RDKAFKA_ROOT_DIR` must contain the following structure:
8280

83-
---
81+
```Shell
82+
${RDKAFKA_ROOT_DIR}/
83+
|
84+
+ include/librdkafka/rdkafka.h
85+
|
86+
+ lib/librdkafka.a
87+
```
8488

8589
By default, a shared library will be built. If you want to perform a static build,
86-
use the _CPPKAFKA_BUILD_SHARED_ parameter:
90+
use the `CPPKAFKA_BUILD_SHARED` parameter:
8791

8892
```Shell
8993
cmake .. -DCPPKAFKA_BUILD_SHARED=0

Diff for: src/kafka_handle_base.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void KafkaHandleBase::set_handle(rd_kafka_t* handle) {
172172
Topic KafkaHandleBase::get_topic(const string& name, rd_kafka_topic_conf_t* conf) {
173173
rd_kafka_topic_t* topic = rd_kafka_topic_new(get_handle(), name.data(), conf);
174174
if (!topic) {
175-
throw HandleException(rd_kafka_errno2err(errno));
175+
throw HandleException(rd_kafka_last_error());
176176
}
177177
return Topic(topic);
178178
}

0 commit comments

Comments
 (0)