File librdkafka_jemalloc.patch of Package librdkafka

diff --git a/lds-gen.py b/lds-gen.py
index b3ad9fb..d071acb 100755
--- a/lds-gen.py
+++ b/lds-gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # librdkafka - Apache Kafka C library
 #
diff --git a/packaging/get_version.py b/packaging/get_version.py
index 3d98d21..fbd5164 100755
--- a/packaging/get_version.py
+++ b/packaging/get_version.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 import sys
 
diff --git a/packaging/nuget/artifact.py b/packaging/nuget/artifact.py
index 61b1d80..19931e3 100755
--- a/packaging/nuget/artifact.py
+++ b/packaging/nuget/artifact.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # Collects CI artifacts from S3 storage, downloading them
diff --git a/packaging/nuget/packaging.py b/packaging/nuget/packaging.py
index 38c2e7e..a9341c8 100755
--- a/packaging/nuget/packaging.py
+++ b/packaging/nuget/packaging.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # NuGet packaging script.
 # Assembles a NuGet package using CI artifacts in S3
diff --git a/packaging/nuget/release.py b/packaging/nuget/release.py
index 692ee6b..285db05 100755
--- a/packaging/nuget/release.py
+++ b/packaging/nuget/release.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # NuGet release packaging tool.
diff --git a/packaging/nuget/zfile/zfile.py b/packaging/nuget/zfile/zfile.py
index 8616078..6b22a8d 100644
--- a/packaging/nuget/zfile/zfile.py
+++ b/packaging/nuget/zfile/zfile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 import os
 import tarfile
diff --git a/packaging/tools/gh-release-checksums.py b/packaging/tools/gh-release-checksums.py
index 13ebba8..8dfecc5 100755
--- a/packaging/tools/gh-release-checksums.py
+++ b/packaging/tools/gh-release-checksums.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Calculate checksums for GitHub release artifacts/assets.
 #
diff --git a/src/rd.h b/src/rd.h
index f1b13bd..5ff495d 100644
--- a/src/rd.h
+++ b/src/rd.h
@@ -117,18 +117,8 @@ static RD_INLINE RD_UNUSED void rd_free(void *ptr) {
 	free(ptr);
 }
 
-static RD_INLINE RD_UNUSED char *rd_strdup(const char *s) {
-#ifndef _MSC_VER
-	char *n = strdup(s);
-#else
-	char *n = _strdup(s);
-#endif
-	rd_assert(n);
-	return n;
-}
-
 static RD_INLINE RD_UNUSED char *rd_strndup(const char *s, size_t len) {
-#if HAVE_STRNDUP
+#if 0
 	char *n = strndup(s, len);
 	rd_assert(n);
 #else
@@ -140,6 +130,15 @@ static RD_INLINE RD_UNUSED char *rd_strndup(const char *s, size_t len) {
 	return n;
 }
 
+static RD_INLINE RD_UNUSED char *rd_strdup(const char *s) {
+#ifndef _MSC_VER
+	char *n = rd_strndup(s, strlen(s));
+#else
+	char *n = _strdup(s);
+#endif
+	rd_assert(n);
+	return n;
+}
 
 
 /*
diff --git a/tests/LibrdkafkaTestApp.py b/tests/LibrdkafkaTestApp.py
index 70fc28d..d96a301 100644
--- a/tests/LibrdkafkaTestApp.py
+++ b/tests/LibrdkafkaTestApp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # librdkafka test trivup app module
 #
diff --git a/tests/broker_version_tests.py b/tests/broker_version_tests.py
index a1edcca..dd4fcec 100755
--- a/tests/broker_version_tests.py
+++ b/tests/broker_version_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # Run librdkafka regression tests on with different SASL parameters
diff --git a/tests/cluster_testing.py b/tests/cluster_testing.py
index 8964118..0ca408f 100755
--- a/tests/cluster_testing.py
+++ b/tests/cluster_testing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # Cluster testing helper
diff --git a/tests/interactive_broker_version.py b/tests/interactive_broker_version.py
index 4614c69..b8665fe 100755
--- a/tests/interactive_broker_version.py
+++ b/tests/interactive_broker_version.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # Run librdkafka regression tests on different supported broker versions.
diff --git a/tests/performance_plot.py b/tests/performance_plot.py
index a653c5d..dd70714 100755
--- a/tests/performance_plot.py
+++ b/tests/performance_plot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 
 import sys, json
diff --git a/tests/sasl_test.py b/tests/sasl_test.py
index df19d44..1e877f0 100755
--- a/tests/sasl_test.py
+++ b/tests/sasl_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 #
 # Run librdkafka regression tests on with different SASL parameters
openSUSE Build Service is sponsored by