about summary refs log tree commit diff stats
path: root/src/wrapped/generated/wrappedlibpthreadtypes.h
diff options
context:
space:
mode:
authorGergő Móricz <mo.geryy@gmail.com>2021-10-17 21:19:52 +0200
committerGergő Móricz <mo.geryy@gmail.com>2021-10-17 21:19:52 +0200
commite1a2230e9ca654cdd2b4230060a304d792843914 (patch)
treea2ae3df6866b43bd75d4ce706caa2fe04c130d6a /src/wrapped/generated/wrappedlibpthreadtypes.h
parent82bd4431e6f0a43c28bf4d28d49eeee8b52df8c3 (diff)
downloadbox64-e1a2230e9ca654cdd2b4230060a304d792843914.tar.gz
box64-e1a2230e9ca654cdd2b4230060a304d792843914.zip
Add alignment wrapper to pthread_getattr_np.
This fixes stack corruption when using pthread_getattr_np on
hirsute (Ubuntu 21.04) and libc >=2.33

This should also fix #130.
Diffstat (limited to 'src/wrapped/generated/wrappedlibpthreadtypes.h')
-rw-r--r--src/wrapped/generated/wrappedlibpthreadtypes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h
index 2b0d9f50..f7c3a0de 100644
--- a/src/wrapped/generated/wrappedlibpthreadtypes.h
+++ b/src/wrapped/generated/wrappedlibpthreadtypes.h
@@ -14,6 +14,7 @@
 typedef void (*vFp_t)(void*);
 typedef int64_t (*iFp_t)(void*);
 typedef void (*vFpi_t)(void*, int64_t);
+typedef int64_t (*iFLp_t)(uintptr_t, void*);
 typedef int64_t (*iFpi_t)(void*, int64_t);
 typedef int64_t (*iFpL_t)(void*, uintptr_t);
 typedef int64_t (*iFpp_t)(void*, void*);
@@ -48,6 +49,7 @@ typedef int64_t (*iFpppp_t)(void*, void*, void*, void*);
 	GO(pthread_mutexattr_init, iFp_t) \
 	GO(_pthread_cleanup_pop, vFpi_t) \
 	GO(_pthread_cleanup_pop_restore, vFpi_t) \
+	GO(pthread_getattr_np, iFLp_t) \
 	GO(__pthread_mutexattr_settype, iFpi_t) \
 	GO(pthread_attr_setdetachstate, iFpi_t) \
 	GO(pthread_attr_setinheritsched, iFpi_t) \