mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
linux-user: Use public sigev_notify_thread_id member if available
_sigev_un._tid is an internal glibc field and is not available on musl libc. The sigevent(7) man page and Linux UAPI headers both use sigev_notify_thread_id as a public way to access this field. musl libc supports this field since 1.2.2[0], and glibc plans to add support as well[1][2]. If sigev_notify_thread_id is not available, fall back to _sigev_un._tid as before. [0] http://git.musl-libc.org/cgit/musl/commit/?id=7c71792e87691451f2a6b76348e83ad1889f1dcb [1] https://www.openwall.com/lists/musl/2019/08/01/5 [2] https://sourceware.org/bugzilla/show_bug.cgi?id=27417 Signed-off-by: Michael Forney <mforney@mforney.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210526035556.7931-1-mforney@mforney.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
febf6fade6
commit
96ff758c6e
2 changed files with 21 additions and 1 deletions
16
configure
vendored
16
configure
vendored
|
@ -4440,6 +4440,19 @@ if compile_prog "" "" ; then
|
|||
st_atim=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# check if we have sigev_notify_thread_id
|
||||
|
||||
sigev_notify_thread_id=no
|
||||
cat > $TMPC << EOF
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
int main(void) { return offsetof(struct sigevent, sigev_notify_thread_id); }
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
sigev_notify_thread_id=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# check if trace backend exists
|
||||
|
||||
|
@ -5692,6 +5705,9 @@ fi
|
|||
if test "$st_atim" = "yes" ; then
|
||||
echo "HAVE_STRUCT_STAT_ST_ATIM=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$sigev_notify_thread_id" = "yes" ; then
|
||||
echo "HAVE_SIGEV_NOTIFY_THREAD_ID=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$byteswap_h" = "yes" ; then
|
||||
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue