mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Don't assume pthread_t is uint_t for portability
POSIX doesn't define pthread_t as uint_t. It could be a pointer. This code causes below compile error on a platform using pointer for pthread_t. -- kernel.c:815:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] (void) printf("%u ", (uint_t)pthread_self()); Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Closes #8558
This commit is contained in:
parent
9a65234c8b
commit
5ae4e4481e
@ -813,7 +813,8 @@ __dprintf(boolean_t dprint, const char *file, const char *func,
|
||||
if (dprintf_find_string("pid"))
|
||||
(void) printf("%d ", getpid());
|
||||
if (dprintf_find_string("tid"))
|
||||
(void) printf("%u ", (uint_t)pthread_self());
|
||||
(void) printf("%ju ",
|
||||
(uintmax_t)(uintptr_t)pthread_self());
|
||||
if (dprintf_find_string("cpu"))
|
||||
(void) printf("%u ", getcpuid());
|
||||
if (dprintf_find_string("time"))
|
||||
|
Loading…
Reference in New Issue
Block a user