diff options
Diffstat (limited to 'libc/misc/internals')
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 3 | ||||
-rw-r--r-- | libc/misc/internals/reloc_static_pie.c | 5 | ||||
-rw-r--r-- | libc/misc/internals/tempname.c | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index affa0ce0a..64a9c8214 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -109,7 +109,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av); * in or linker will disregard these weaks. */ -static int __pthread_return_0 (pthread_mutex_t *unused) { return 0; } +static int __pthread_return_0 (pthread_mutex_t *unused) { (void)unused; return 0; } weak_alias (__pthread_return_0, __pthread_mutex_lock) weak_alias (__pthread_return_0, __pthread_mutex_trylock) weak_alias (__pthread_return_0, __pthread_mutex_unlock) @@ -117,6 +117,7 @@ weak_alias (__pthread_return_0, __pthread_mutex_unlock) int weak_function __pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) { + (void)mutex; (void)attr; return 0; } diff --git a/libc/misc/internals/reloc_static_pie.c b/libc/misc/internals/reloc_static_pie.c index ab1923024..cb2c4df87 100644 --- a/libc/misc/internals/reloc_static_pie.c +++ b/libc/misc/internals/reloc_static_pie.c @@ -21,7 +21,7 @@ #include <dl-elf.h> #include <ldso.h> -#if defined(__mips__) || defined(__xtensa__) +#if defined(__m68k__) || defined(__mips__) || defined(__xtensa__) #include <dl-startup.h> #endif @@ -53,6 +53,9 @@ reloc_static_pie(ElfW(Addr) load_addr) PERFORM_BOOTSTRAP_GOT(tpnt); #endif +#if !defined(__FDPIC__) + DL_RELOCATE_RELR(tpnt); +#endif #if defined(ELF_MACHINE_PLTREL_OVERLAP) # define INDX_MAX 1 diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index d3a8ccbd8..f9b714a68 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -218,7 +218,8 @@ int attribute_hidden __gen_tempname (char *tmpl, int kind, int flags, /* Give up now. */ return -1; } else - fd = 0; + /* File already exists, so return with non-zero value */ + return -1; } case __GT_FILE: fd = open (tmpl, O_RDWR | O_CREAT | O_EXCL | flags, mode); |