[lxc-devel] [PATCH 06/21] Replace get_current_dir_name by getcwd

Stéphane Graber stgraber at ubuntu.com
Thu Jan 3 17:24:07 UTC 2013


get_current_dir_name appears to be specific to glibc. Replace that call
by an equivalent getcwd call.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/lxc_attach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c
index e292bc4..ba98d73 100644
--- a/src/lxc/lxc_attach.c
+++ b/src/lxc/lxc_attach.c
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	curdir = get_current_dir_name();
+	curdir = getcwd(NULL, 0);
 
 	/* determine which namespaces the container was created with
 	 * by asking lxc-start
-- 
1.8.0





More information about the lxc-devel mailing list