From ebb6b00bf66828c5a2587dd2cd44f8810e01e00b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 16 Jul 2017 16:26:07 +0000 Subject: Fix ftrigw_fifodir_make on platforms where gid_t is unsigned (the BSDs, who would have thought!) --- src/libs6/ftrigw_fifodir_make.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs6') diff --git a/src/libs6/ftrigw_fifodir_make.c b/src/libs6/ftrigw_fifodir_make.c index c7b93a5..86e9310 100644 --- a/src/libs6/ftrigw_fifodir_make.c +++ b/src/libs6/ftrigw_fifodir_make.c @@ -19,7 +19,7 @@ int ftrigw_fifodir_make (char const *path, gid_t gid, int force) if (!force) return 1 ; } else umask(m) ; - if ((gid >= 0) && (chown(path, -1, gid) == -1)) return 0 ; - if (chmod(path, (gid >= 0) ? 03730 : 01733) == -1) return 0 ; + if ((gid != (gid_t)-1) && (chown(path, -1, gid) == -1)) return 0 ; + if (chmod(path, (gid != (gid_t)-1) ? 03730 : 01733) == -1) return 0 ; return 1 ; } -- cgit v1.2.3