#include <unistd.h>
#include <sys/mman.h>
#include <sys/param.h>
+#include <dl-sysdep.h>
#include <tls.h>
/* There is at least one more thread. */
pd->header.data.multiple_threads = 1;
+#ifdef NEED_DL_SYSINFO
+ /* Copy the sysinfo value from the parent. */
+ pd->header.data.sysinfo
+ = THREAD_GETMEM (THREAD_SELF, header.data.sysinfo);
+#endif
+
/* Allocate the DTV for this thread. */
if (_dl_allocate_tls (pd) == NULL)
/* Something went wrong. */
/* There is at least one more thread. */
pd->header.data.multiple_threads = 1;
+#ifdef NEED_DL_SYSINFO
+ /* Copy the sysinfo value from the parent. */
+ pd->header.data.sysinfo
+ = THREAD_GETMEM (THREAD_SELF, header.data.sysinfo);
+#endif
+
/* Allocate the DTV for this thread. */
if (_dl_allocate_tls (pd) == NULL)
{