about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/getcwd.c')
-rw-r--r--sysdeps/unix/sysv/linux/getcwd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c
index fabc4bb8cc..c5886f5283 100644
--- a/sysdeps/unix/sysv/linux/getcwd.c
+++ b/sysdeps/unix/sysv/linux/getcwd.c
@@ -40,7 +40,10 @@
    named `cwd'.  Reading the content of this link immediate gives us the
    information.  But we have to take care for systems which do not have
    the proc filesystem mounted.  Use the POSIX implementation in this case.  */
-static char *generic_getcwd (char *buf, size_t size);
+
+/* Get the code for the generic version.  */
+#define GETCWD_RETURN_TYPE	static char *
+#include <sysdeps/posix/getcwd.c>
 
 char *
 __getcwd (char *buf, size_t size)
@@ -105,7 +108,7 @@ __getcwd (char *buf, size_t size)
 	}
 #endif
 
-      result = generic_getcwd (path, size);
+      result = __getcwd_generic (path, size);
 
 #ifndef NO_ALLOCATION
       if (result == NULL && buf == NULL && size != 0)
@@ -129,8 +132,3 @@ __getcwd (char *buf, size_t size)
 }
 libc_hidden_def (__getcwd)
 weak_alias (__getcwd, getcwd)
-
-/* Get the code for the generic version.  */
-#define GETCWD_RETURN_TYPE	static char *
-#define __getcwd		generic_getcwd
-#include <sysdeps/posix/getcwd.c>