diff options
author | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2022-09-14 01:11:45 -0700 |
---|---|---|
committer | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2022-09-14 18:38:09 -0700 |
commit | fe39ffdc202f04397f31557f17170b40bc42b77a (patch) | |
tree | c3ca6dc745c7d4a6d13d1403fabf2240844b7ba9 /gprofng/libcollector/dispatcher.c | |
parent | 8422cbe455d762f068ed1edefc717f36a105da42 (diff) | |
download | binutils-gdb-fe39ffdc202f04397f31557f17170b40bc42b77a.tar.gz |
gprofng: fix build issues on musl
gprofng/ChangeLog
2022-09-14 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/29477
* configure.ac: Set __MUSL_LIBC.
* configure: Rebuild.
* common/config.h.in: Rebuild.
* src/collector_module.h: Fix compiler errors because mmap64, open64,
pwrite64 are macros and getcontext() is absent on musl.
* libcollector/collector.c: Likewise.
* libcollector/hwprofile.c: Likewise.
* libcollector/iolib.c: Likewise.
* libcollector/libcol_util.c: Likewise.
* libcollector/linetrace.c: Likewise.
* libcollector/memmgr.c: Likewise.
* libcollector/profile.c: Likewise.
* libcollector/unwind.c: Likewise.
* libcollector/dispatcher.c: Likewise.
* src/Experiment.cc: Likewise.
* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
on musl.
* libcollector/iotrace.c: Remove interposition of versioned functions.
* libcollector/mmaptrace.c: Likewise.
* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
* libcollector/jprofile.c: Likewise.
* libcollector/synctrace.c: Include "collector.h".
* src/Print.cc: Use get_basename() because basename() is not defined
on musl.
* common/hwcdrv.c: Fix -Wformat= warnings.
Diffstat (limited to 'gprofng/libcollector/dispatcher.c')
-rw-r--r-- | gprofng/libcollector/dispatcher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c index f0308605d76..d3e4c52d667 100644 --- a/gprofng/libcollector/dispatcher.c +++ b/gprofng/libcollector/dispatcher.c @@ -30,9 +30,7 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> -#include <ucontext.h> #include <sys/param.h> -#include <sys/signal.h> #include <sys/syscall.h> #include <time.h> #include <signal.h> @@ -575,7 +573,9 @@ collector_timer_create (timer_t * ptimerid) sigev.sigev_notify = SIGEV_THREAD_ID | SIGEV_SIGNAL; sigev.sigev_signo = SIGPROF; sigev.sigev_value.sival_ptr = ptimerid; +#if !defined(__MUSL_LIBC) sigev._sigev_un._tid = __collector_gettid (); +#endif if (CALL_REAL (timer_create)(CLOCK_THREAD_CPUTIME_ID, &sigev, ptimerid) == -1) { TprintfT (DBG_LT2, "collector_timer_settime() failed! errno=%d\n", errno); |