diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-07-16 16:26:07 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-07-16 16:26:07 +0000 |
commit | ebb6b00bf66828c5a2587dd2cd44f8810e01e00b (patch) | |
tree | c95690bd98c950d6635b5f5a4dac6d2592f8fa13 /src/libs6 | |
parent | 75a45548fa04584809d34550fbc4b43cd08c294e (diff) | |
download | s6-ebb6b00bf66828c5a2587dd2cd44f8810e01e00b.tar.xz |
Fix ftrigw_fifodir_make on platforms where gid_t is unsigned (the BSDs, who would have thought!)
Diffstat (limited to 'src/libs6')
-rw-r--r-- | src/libs6/ftrigw_fifodir_make.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 ; } |