|
1 | | - packaging/cmake/Modules/FindZSTD.cmake | 4 ++-- |
2 | | - src-cpp/CMakeLists.txt | 2 ++ |
3 | | - src/CMakeLists.txt | 2 ++ |
4 | | - 3 files changed, 6 insertions(+), 2 deletions(-) |
| 1 | +--- |
| 2 | + examples/idempotent_producer.c | 11 +++++++++-- |
| 3 | + examples/transactions.c | 8 ++++++-- |
| 4 | + packaging/cmake/Modules/FindZSTD.cmake | 3 +-- |
| 5 | + src-cpp/CMakeLists.txt | 1 + |
| 6 | + 4 files changed, 17 insertions(+), 6 deletions(-) |
5 | 7 |
|
| 8 | +diff --git a/examples/idempotent_producer.c b/examples/idempotent_producer.c |
| 9 | +index bb34610c..a12e642f 100644 |
| 10 | +--- a/examples/idempotent_producer.c |
| 11 | ++++ b/examples/idempotent_producer.c |
| 12 | +@@ -43,10 +43,17 @@ |
| 13 | + #define _BSD_SOURCE /* vsnprintf() */ |
| 14 | + #include <stdio.h> |
| 15 | + #include <signal.h> |
| 16 | +-#include <unistd.h> |
| 17 | + #include <string.h> |
| 18 | + |
| 19 | ++#include "tinycthread.h" |
| 20 | + |
| 21 | ++/* Platform specific includes */ |
| 22 | ++#if defined(_TTHREAD_POSIX_) |
| 23 | ++ #include <unistd.h> |
| 24 | ++#elif defined(_TTHREAD_WIN32_) |
| 25 | ++ #include <process.h> |
| 26 | ++ #include "rdwin32.h" |
| 27 | ++#endif |
| 28 | + /* Typical include path would be <librdkafka/rdkafka.h>, but this program |
| 29 | + * is builtin from within the librdkafka source tree and thus differs. */ |
| 30 | + #include "rdkafka.h" |
| 31 | +@@ -318,7 +325,7 @@ int main(int argc, char **argv) { |
| 32 | + |
| 33 | + /* Short sleep to rate-limit this example. |
| 34 | + * A real application should not do this. */ |
| 35 | +- usleep(500 * 1000); /* 500ms */ |
| 36 | ++ rd_usleep(500 * 1000); /* 500ms */ |
| 37 | + } |
| 38 | + |
| 39 | + |
| 40 | +diff --git a/examples/transactions.c b/examples/transactions.c |
| 41 | +index 705e504e..3ef832ff 100644 |
| 42 | +--- a/examples/transactions.c |
| 43 | ++++ b/examples/transactions.c |
| 44 | +@@ -43,13 +43,17 @@ |
| 45 | + |
| 46 | + #include <stdio.h> |
| 47 | + #include <signal.h> |
| 48 | +-#include <unistd.h> |
| 49 | + #include <string.h> |
| 50 | + #include <stdlib.h> |
| 51 | + #include <time.h> |
| 52 | + #include <ctype.h> |
| 53 | + |
| 54 | +- |
| 55 | ++/* Platform specific includes */ |
| 56 | ++#if defined(_TTHREAD_POSIX_) |
| 57 | ++ #include <unistd.h> |
| 58 | ++#elif defined(_TTHREAD_WIN32_) |
| 59 | ++ #include <process.h> |
| 60 | ++#endif |
| 61 | + /* Typical include path would be <librdkafka/rdkafka.h>, but this program |
| 62 | + * is builtin from within the librdkafka source tree and thus differs. */ |
| 63 | + #include "rdkafka.h" |
6 | 64 | diff --git a/packaging/cmake/Modules/FindZSTD.cmake b/packaging/cmake/Modules/FindZSTD.cmake |
7 | | -index 7de137e0..851468fe 100644 |
| 65 | +index 7de137e0..f5621302 100644 |
8 | 66 | --- a/packaging/cmake/Modules/FindZSTD.cmake |
9 | 67 | +++ b/packaging/cmake/Modules/FindZSTD.cmake |
10 | | -@@ -8,8 +8,8 @@ |
| 68 | +@@ -8,8 +8,7 @@ |
11 | 69 |
|
12 | 70 | find_path(ZSTD_INCLUDE_DIR NAMES zstd.h) |
13 | 71 |
|
14 | 72 | -find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd) |
15 | 73 | -find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static) |
16 | | -+ |
17 | 74 | +find_library(ZSTD_LIBRARY_RELEASE NAMES libzstd_a) |
18 | 75 |
|
19 | 76 | include(SelectLibraryConfigurations) |
20 | 77 | SELECT_LIBRARY_CONFIGURATIONS(ZSTD) |
21 | 78 | diff --git a/src-cpp/CMakeLists.txt b/src-cpp/CMakeLists.txt |
22 | | -index a7b3e83e..a518ebcc 100644 |
| 79 | +index 2b496d9f..a5e594fe 100644 |
23 | 80 | --- a/src-cpp/CMakeLists.txt |
24 | 81 | +++ b/src-cpp/CMakeLists.txt |
25 | | -@@ -97,3 +97,5 @@ install( |
26 | | - FILES "rdkafkacpp.h" |
27 | | - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/librdkafka" |
28 | | - ) |
29 | | -+ |
30 | | -+set_target_properties(rdkafka++ PROPERTIES OUTPUT_NAME librdkafka++) |
31 | | -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
32 | | -index c6c05e06..3b45590d 100644 |
33 | | ---- a/src/CMakeLists.txt |
34 | | -+++ b/src/CMakeLists.txt |
35 | | -@@ -348,3 +348,5 @@ install( |
36 | | - FILES "rdkafka.h" "rdkafka_mock.h" |
37 | | - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/librdkafka" |
38 | | - ) |
39 | | -+ |
40 | | -+set_target_properties(rdkafka PROPERTIES OUTPUT_NAME librdkafka) |
| 82 | +@@ -54,6 +54,8 @@ if(NOT RDKAFKA_BUILD_STATIC) |
| 83 | + FILES ${GENERATED_DIR}/rdkafka++.pc |
| 84 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" |
| 85 | + ) |
| 86 | ++ set_target_properties(rdkafka PROPERTIES OUTPUT_NAME librdkafka) |
| 87 | ++ set_target_properties(rdkafka++ PROPERTIES OUTPUT_NAME librdkafka++) |
| 88 | + else() |
| 89 | + set(PKG_CONFIG_NAME "librdkafka++-static") |
| 90 | + set(PKG_CONFIG_DESCRIPTION "The Apache Kafka C/C++ library (static)") |
| 91 | + |
0 commit comments