]> granicus.if.org Git - zfs/commit
Don't assume pthread_t is uint_t for portability
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 10 Apr 2019 03:49:03 +0000 (12:49 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Apr 2019 03:49:03 +0000 (20:49 -0700)
commit5ae4e4481eede259a64260ab1b09f86ff46c8f8d
tree36220e4ba762e8b31cc33919066e2cdb3d24f8ae
parent9a65234c8bbfe4e394d32172439ae0266ac59c8d
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
lib/libzpool/kernel.c