genwqe-tools/genwqe-user-4.0.20-glibc-2.30-gettid-naming-conflict.patch
DistroBaker 72b6fedc85 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/genwqe-tools.git#6ab1d7a8a32cd6ef2cab67f41fc50a85b5f0918a
2020-12-16 21:19:56 +00:00

294 lines
9.8 KiB
Diff

diff -up genwqe-user-4.0.20/lib/card_defs.h.me genwqe-user-4.0.20/lib/card_defs.h
--- genwqe-user-4.0.20/lib/card_defs.h.me 2020-01-22 16:19:20.402193318 +0100
+++ genwqe-user-4.0.20/lib/card_defs.h 2020-01-22 16:24:19.363948393 +0100
@@ -32,19 +32,19 @@
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
#define pr_err(fmt, ...) \
fprintf(stderr, "%08x.%08x %s:%u: Error: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
+ getpid(), sys_gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
#define pr_warn(fmt, ...) do { \
if (_dbg_flag) \
fprintf(stderr, "%08x.%08x %s:%u: Warn: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
@@ -56,7 +56,7 @@ static inline pid_t gettid(void)
#define pr_info(fmt, ...) do { \
if (_dbg_flag) \
fprintf(stderr, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
diff -up genwqe-user-4.0.20/lib/ddcb_capi.c.me genwqe-user-4.0.20/lib/ddcb_capi.c
--- genwqe-user-4.0.20/lib/ddcb_capi.c.me 2020-01-22 16:18:44.625864311 +0100
+++ genwqe-user-4.0.20/lib/ddcb_capi.c 2020-01-22 16:24:09.547857765 +0100
@@ -61,7 +61,7 @@ extern FILE *libddcb_fd_out;
#include <sys/syscall.h> /* For SYS_xxx definitions */
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -69,25 +69,25 @@ static inline pid_t gettid(void)
#define VERBOSE0(fmt, ...) do { \
if (libddcb_fd_out) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE1(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 0)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE2(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 1)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define VERBOSE3(fmt, ...) do { \
if (libddcb_fd_out && (libddcb_verbose > 3)) \
fprintf(libddcb_fd_out, "%08x.%08x: " fmt, \
- getpid(), gettid(), ## __VA_ARGS__); \
+ getpid(), sys_gettid(), ## __VA_ARGS__); \
} while (0)
#define __free(ptr) free((ptr))
diff -up genwqe-user-4.0.20/lib/hw_defs.h.me genwqe-user-4.0.20/lib/hw_defs.h
--- genwqe-user-4.0.20/lib/hw_defs.h.me 2020-01-22 16:23:17.373376030 +0100
+++ genwqe-user-4.0.20/lib/hw_defs.h 2020-01-22 16:24:02.595793576 +0100
@@ -33,7 +33,7 @@
# define ABS(a) (((a) < 0) ? -(a) : (a))
#endif
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -44,14 +44,14 @@ extern FILE *zedc_log;
#define pr_err(fmt, ...) do { \
if (zedc_log) \
fprintf(zedc_log, "%08x.%08x %s:%u: Error: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
#define pr_warn(fmt, ...) do { \
if (zedc_log) \
fprintf(zedc_log, "%08x.%08x %s:%u: Warn: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
@@ -63,14 +63,14 @@ extern FILE *zedc_log;
#define pr_info(fmt, ...) do { \
if (zedc_log && zedc_dbg) \
fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
#define pr_log(dbg, fmt, ...) do { \
if (zedc_log && (dbg)) \
fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
- getpid(), gettid(), __FILE__, __LINE__, \
+ getpid(), sys_gettid(), __FILE__, __LINE__, \
## __VA_ARGS__); \
} while (0)
diff -up genwqe-user-4.0.20/misc/zpipe_append.c.me genwqe-user-4.0.20/misc/zpipe_append.c
--- genwqe-user-4.0.20/misc/zpipe_append.c.me 2020-01-22 16:24:32.062065638 +0100
+++ genwqe-user-4.0.20/misc/zpipe_append.c 2020-01-22 16:25:35.884654925 +0100
@@ -61,7 +61,7 @@ static unsigned int CHUNK_i = 16 * 1024;
static unsigned int CHUNK_o = 16 * 1024; /* 16384; */
static int _pattern = 0;
-static inline pid_t gettid(void)
+static inline pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
diff -up genwqe-user-4.0.20/misc/zpipe_mt.c.me genwqe-user-4.0.20/misc/zpipe_mt.c
--- genwqe-user-4.0.20/misc/zpipe_mt.c.me 2020-01-22 16:25:05.510374476 +0100
+++ genwqe-user-4.0.20/misc/zpipe_mt.c 2020-01-22 16:27:10.566529136 +0100
@@ -126,7 +126,7 @@ static int pin_to_cpu(int run_cpu)
return run_cpu;
}
-static pid_t gettid(void)
+static pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -178,7 +178,7 @@ static int check_for_pattern(const unsig
"it=%d: %d or more times \"%02x\" "
"at %016lx!\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
(unsigned long)in,
(unsigned long)out,
it, zeros, pattern,
@@ -253,11 +253,11 @@ static int def(struct thread_data *d, FI
strm.next_out = out;
memset(strm.next_out, 0xF0, chunk_o);
if (chunk_o >= 8)
- *((uint32_t *)&out[4]) = gettid();
+ *((uint32_t *)&out[4]) = sys_gettid();
pr_dbg(3, "%08lx.%08lx 1) %02x%02x%02x%02x%02x ...\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
out[0], out[1], out[2], out[3], out[4]);
ret = deflate(&strm, flush); /* no bad ret value */
@@ -267,7 +267,7 @@ static int def(struct thread_data *d, FI
pr_dbg(3, "%08lx.%08lx 2) %02x%02x%02x%02x%02x ...\n",
(unsigned long)getpid(),
- (unsigned long)gettid(),
+ (unsigned long)sys_gettid(),
out[0], out[1], out[2], out[3], out[4]);
if (check_for_pattern(out, have, nr, in, out, 0x00) ||
@@ -488,16 +488,16 @@ static void *libz_thread(void *data)
char i_fname[64], o_fname[64], n_fname[64];
char diff_cmd[128];
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
for (i = 0; (i < (unsigned int)count) && (exit_on_err == 0); i++) {
unsigned int j;
int new_cpu;
- sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), gettid(), i);
- sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), gettid(), i);
- sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), gettid(), i);
+ sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
+ sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
+ sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), sys_gettid(), i);
i_fp = fopen(i_fname, "w+");
for (j = 0, len = 0; len < data_size; j++) {
@@ -534,7 +534,7 @@ static void *libz_thread(void *data)
exit(EXIT_FAILURE);
pr_dbg(3, "%08x.%08x %d. compressing ...\n",
- getpid(), gettid(), i);
+ getpid(), sys_gettid(), i);
rc = def(d, i_fp, o_fp, Z_DEFAULT_COMPRESSION, i);
if (rc != Z_OK) {
@@ -549,7 +549,7 @@ static void *libz_thread(void *data)
new_cpu = sched_getcpu();
if (d->cpu != new_cpu) {
pr_dbg(1, "%08x.%08x CPU moved from %d to %d\n",
- getpid(), gettid(), d->cpu, new_cpu);
+ getpid(), sys_gettid(), d->cpu, new_cpu);
d->cpu = new_cpu;
}
@@ -558,7 +558,7 @@ static void *libz_thread(void *data)
d->compressions++;
pr_dbg(3, "%08x.%08x %d. decompressing ...\n",
- getpid(), gettid(), i);
+ getpid(), sys_gettid(), i);
o_fp = fopen(o_fname, "r"); /* original data */
if (o_fp == NULL)
@@ -573,7 +573,7 @@ static void *libz_thread(void *data)
error_trigger();
fprintf(stderr, "%08x.%08x err/inf: rc=%d %s %s %s\n",
- getpid(), gettid(), rc,
+ getpid(), sys_gettid(), rc,
i_fname, o_fname, n_fname);
zerr(rc);
@@ -582,7 +582,7 @@ static void *libz_thread(void *data)
rc = system(diff_cmd);
if (rc != 0)
fprintf(stderr, "%08x.%08x %s: %d\n",
- getpid(), gettid(),
+ getpid(), sys_gettid(),
strerror(errno), errno);
goto exit_failure;
@@ -605,7 +605,7 @@ static void *libz_thread(void *data)
error_trigger();
fprintf(stderr, "%08x.%08x In %s and Out %s differ!\n",
- getpid(), gettid(), i_fname, n_fname);
+ getpid(), sys_gettid(), i_fname, n_fname);
goto exit_failure;
}
diff -up genwqe-user-4.0.20/tools/zlib_mt_perf.c.me genwqe-user-4.0.20/tools/zlib_mt_perf.c
--- genwqe-user-4.0.20/tools/zlib_mt_perf.c.me 2020-01-22 16:27:23.608649564 +0100
+++ genwqe-user-4.0.20/tools/zlib_mt_perf.c 2020-01-22 16:28:09.166070205 +0100
@@ -162,7 +162,7 @@ static int pin_to_cpu(int run_cpu)
return run_cpu;
}
-static pid_t gettid(void)
+static pid_t sys_gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
@@ -492,7 +492,7 @@ static void *libz_thread_defl(void *data
d->defl_total=0;
d->defl_time=0;
d->comp_calls=0;
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
d->first_run = true;
d->checksum = 0;
@@ -533,7 +533,7 @@ static void *libz_thread_infl(void *data
d->infl_total = 0;
d->infl_time = 0;
d->decomp_calls = 0;
- d->tid = gettid();
+ d->tid = sys_gettid();
d->cpu = sched_getcpu();
d->first_run = true;
d->checksum = 0;
@@ -550,7 +550,7 @@ static void *libz_thread_infl(void *data
rc = infl(d, c_fp);
if (rc != Z_OK) {
fprintf(stderr, "%08x.%08x err/inf: rc=%d %s\n",
- getpid(), gettid(), rc, c_fname);
+ getpid(), sys_gettid(), rc, c_fname);
zerr(rc);
goto exit_failure;
}