diff options
Diffstat (limited to 'user/waypipe/tid-is-pointer.patch')
-rw-r--r-- | user/waypipe/tid-is-pointer.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/user/waypipe/tid-is-pointer.patch b/user/waypipe/tid-is-pointer.patch new file mode 100644 index 000000000..d2cfcd8d4 --- /dev/null +++ b/user/waypipe/tid-is-pointer.patch @@ -0,0 +1,15 @@ +On musl systems, pthread_t is an opaque pointer. + +This fails to compile on 32-bit systems because it is attempting to alias a +pointer of 32 bits to an integer of 64 bits, which is invalid. +--- waypipe-v0.9.2/test/common.c.old 2024-11-18 22:29:20.000000000 +0000 ++++ waypipe-v0.9.2/test/common.c 2025-08-11 07:20:46.797918115 +0000 +@@ -412,7 +412,7 @@ + pthread_t tid = pthread_self(); + char msg[1024]; + int nwri = 0; +- nwri += sprintf(msg + nwri, "%" PRIx64 " [%s:%3d] ", (uint64_t)tid, ++ nwri += sprintf(msg + nwri, "%" PRIxPTR " [%s:%3d] ", (uintptr_t)tid, + file, line); + + va_list args; |