Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-12-13 01:45:53 +0300
committerDaniel Golle <daniel@makrotopia.org>2020-12-13 01:50:50 +0300
commit357877693ca363b12e6e7e14d345639b2440cd07 (patch)
tree01c5400d66e3a9761df89600acfa490bad68fa29 /utils.h
parent9e52171d70def760a6949676800d0b73f85ee22d (diff)
utils: introduce mkdir_p
Add new utility function mkdir_p(char *path, mode_t mode) to replace the partially buggy implementations found accross fstools and procd. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 27f81e5..5c53cc0 100644
--- a/utils.h
+++ b/utils.h
@@ -19,6 +19,7 @@
#ifndef __LIBUBOX_UTILS_H
#define __LIBUBOX_UTILS_H
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <stdint.h>
@@ -252,5 +253,6 @@ static inline unsigned long cbuf_size(int order)
void *cbuf_alloc(unsigned int order);
void cbuf_free(void *ptr, unsigned int order);
+int mkdir_p(char *dir, mode_t mask);
#endif