Custom upgrade: suffix lttng_ust_strerror with 1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Jun 2022 18:48:44 +0000 (14:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Sep 2022 18:33:34 +0000 (14:33 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8a4a3017402fe7b9316b451b07bc86738576db91

include/lttng/ust-error.h
src/lib/lttng-ust/strerror.c

index 49045babc5402bd1851fc340a27ce7ad12a6e9d7..46541c1b150706d00eb4815c190370d62ca9668b 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <limits.h>
 #include <unistd.h>
+#include <lttng/ust-config.h>
 #include <lttng/ust-abi.h>
 
 #ifdef __cplusplus
@@ -39,6 +40,11 @@ enum lttng_ust_error_code {
        LTTNG_UST_ERR_NR,                       /* Last element */
 };
 
+/* Custom upgrade 2.12 to 2.13 */
+#ifndef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+#define lttng_ust_strerror             lttng_ust_strerror1
+#endif
+
 /*
  * lttng_ust_strerror
  * @code: must be a negative value of enum lttng_ust_error_code (or 0).
index 5a671a0744bf55b20b2f99573041c4b1f58cd1d1..46bfdb6bd20879ff6e9eae4a53395790b039d602 100644 (file)
@@ -37,7 +37,7 @@ static const char *ustcomm_readable_code[] = {
  * Returns a ptr to a string representing a human readable error code from the
  * ustcomm_return_code enum.
  */
-const char *lttng_ust_strerror(int code)
+static const char *lttng_ust_strerror_orig(int code)
 {
        code = -code;
 
@@ -46,3 +46,13 @@ const char *lttng_ust_strerror(int code)
 
        return ustcomm_readable_code[CODE_OFFSET(code)];
 }
+
+/* Custom upgrade 2.12 to 2.13 */
+#undef lttng_ust_strerror
+const char *lttng_ust_strerror1(int code)
+       __attribute__ ((alias ("lttng_ust_strerror_orig")));
+
+#ifdef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+const char *lttng_ust_strerror(int code)
+       __attribute__ ((alias ("lttng_ust_strerror_orig")));
+#endif
This page took 0.02553 seconds and 5 git commands to generate.