fix TLS memory leak with dlopen
[uclibc-ng.git] / libc / sysdeps / linux / nds32 / mremap.c
blob9b2d835440c5d0975ecc5c15f1f98ecaa1fc3be3
1 /*
2 * Copyright (C) 2017 Andes Technology, Inc.
3 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4 */
6 #include <errno.h>
7 #include <stdarg.h>
8 #include <sysdep.h>
10 #include <sys/mman.h>
11 #include <sys/syscall.h>
13 #ifdef __NR_mremap
14 void *mremap (void *__addr, size_t __old_len, size_t __new_len,
15 int __flags, ...);
16 libc_hidden_proto(mremap)
18 void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...)
20 unsigned long arg1;
21 va_list arg;
22 va_start (arg, __flags);
23 arg1 = va_arg (arg, int);
24 va_end (arg);
25 return (void *)INLINE_SYSCALL(mremap,5,__addr,__old_len,__new_len,__flags,arg1);
27 libc_hidden_def (mremap)
28 #endif