#include <assert.h>
#include <errno.h>
#include <netdb.h>
+#ifdef __UCLIBC_HAS_TLS__
+#include <tls.h>
+#endif
#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
char *buf = ((struct sockaddr_un *)ai->ai_addr)->sun_path;
if (__path_search(buf, L_tmpnam, NULL, NULL, 0) != 0
- || __gen_tempname(buf, __GT_NOCREATE) != 0
+ || __gen_tempname(buf, __GT_NOCREATE, 0) != 0
) {
return -EAI_SYSTEM;
}