fix potential read past end of buffer in getnameinfo host name lookup
[musl] / arch / s390x / pthread_arch.h
index bd90016..e54fec3 100644 (file)
@@ -1,14 +1,12 @@
-static inline struct pthread *__pthread_self()
+static inline uintptr_t __get_tp()
 {
-       struct pthread *self;
-       __asm__ __volatile__ (
+       uintptr_t tp;
+       __asm__ (
                "ear  %0, %%a0\n"
                "sllg %0, %0, 32\n"
                "ear  %0, %%a1\n"
-               : "=r"(self));
-       return self;
+               : "=r"(tp));
+       return tp;
 }
 
-#define TP_ADJ(p) (p)
-
 #define MC_PC psw.addr