/* Provide relocatable packages.
- Copyright (C) 2003-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify it
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
+# define _GNU_SOURCE 1
#endif
#include <config.h>
# define FILE_SYSTEM_PREFIX_LEN(P) 0
#endif
+/* Use the system functions, not the gnulib overrides in this file. */
+#undef malloc
+
/* Original installation prefix. */
static char *orig_prefix;
static size_t orig_prefix_len;
static void
find_shared_library_fullname ()
{
-#if defined __linux__ && __GLIBC__ >= 2
- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
+#if defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)
+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
+ function. */
FILE *fp;
/* Open the current process' maps file. It describes one VMA per line. */