#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h> /* for ptrdiff_t */
+#include <stdbool.h>
#define _FCNTL_H
#include <bits/fcntl.h>
#include <bits/wordsize.h>
#include <sys/types.h>
/* Pull in the arch specific page size */
#include <bits/uClibc_page.h>
+/* Pull in the MIN macro */
+#include <sys/param.h>
/* Pull in the ldso syscalls and string functions */
#ifndef __ARCH_HAS_NO_SHARED__
#include <dl-syscall.h>
/* Global variables used within the shared library loader */
extern char *_dl_library_path; /* Where we look for libraries */
extern char *_dl_preload; /* Things to be loaded before the libs */
-extern char *_dl_ldsopath; /* Where the shared lib loader was found */
+#ifdef __LDSO_SEARCH_INTERP_PATH__
+extern const char *_dl_ldsopath; /* Where the shared lib loader was found */
+#endif
extern const char *_dl_progname; /* The name of the executable being run */
extern size_t _dl_pagesize; /* Store the page size for use later */
#ifdef __LDSO_PRELINK_SUPPORT__
extern char *_dl_debug_bindings;
extern int _dl_debug_file;
# define __dl_debug_dprint(fmt, args...) \
- _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __FUNCTION__, __LINE__, ## args);
+ _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __func__, __LINE__, ## args);
# define _dl_if_debug_dprint(fmt, args...) \
do { if (_dl_debug) __dl_debug_dprint(fmt, ## args); } while (0)
#else