From 879d6c85af32a368feae1625b38716ea493de699 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 2 Aug 2001 09:58:19 +0000 Subject: [PATCH] make_directory used mode as if it were an signed entity, but in fact it was a mode_t which is unsigned. Fix it to be signed... -Erik --- include/libbb.h | 2 +- libbb/libbb.h | 2 +- libbb/make_directory.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libbb.h b/include/libbb.h index df52027ce..70ac36a86 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -259,7 +259,7 @@ extern int create_icmp_socket(void); char *dirname (const char *path); -int make_directory (char *path, mode_t mode, int flags); +int make_directory (char *path, long mode, int flags); const char *u_signal_names(const char *str_sig, int *signo, int startnum); diff --git a/libbb/libbb.h b/libbb/libbb.h index df52027ce..70ac36a86 100644 --- a/libbb/libbb.h +++ b/libbb/libbb.h @@ -259,7 +259,7 @@ extern int create_icmp_socket(void); char *dirname (const char *path); -int make_directory (char *path, mode_t mode, int flags); +int make_directory (char *path, long mode, int flags); const char *u_signal_names(const char *str_sig, int *signo, int startnum); diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 54d9b4c51..0a9d7b160 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -33,7 +33,7 @@ * Also create parent directories as necessary if flags contains * FILEUTILS_RECUR. */ -int make_directory (char *path, mode_t mode, int flags) +int make_directory (char *path, long mode, int flags) { if (!(flags & FILEUTILS_RECUR)) { if (mkdir (path, 0777) < 0) { -- 2.25.1