aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-03-19 15:15:48 +0100
committerFabian Groffen <grobian@gentoo.org>2019-03-19 15:15:48 +0100
commitc796b47b1382845f699cdcf6718f616bb3aa5f28 (patch)
tree1cf8a8078b740e993c6706c3a6b8cb7e041a4481 /libq/xmkdir.c
parentbuild: add autoconf helper files (diff)
downloadportage-utils-c796b47b1382845f699cdcf6718f616bb3aa5f28.tar.gz
portage-utils-c796b47b1382845f699cdcf6718f616bb3aa5f28.tar.bz2
portage-utils-c796b47b1382845f699cdcf6718f616bb3aa5f28.zip
build: add gnulib sources
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'libq/xmkdir.c')
-rw-r--r--libq/xmkdir.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libq/xmkdir.c b/libq/xmkdir.c
index e945227..2e60b08 100644
--- a/libq/xmkdir.c
+++ b/libq/xmkdir.c
@@ -7,7 +7,13 @@
*/
#include "main.h"
-#include "xmalloc.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <xalloc.h>
+
#include "xmkdir.h"
/* Emulate `mkdir -p -m MODE PATH` */
@@ -111,7 +117,8 @@ rmdir_r_at(int dfd, const char *path)
size_t len;
char *p, *e;
- p = xstrdup_len(path, &len);
+ p = xstrdup(path);
+ len = strlen(p);
e = p + len;
while (e != p) {