logo

utils-std

Collection of commonly available Unix tools
commit: 2293ddbd256819b884bf784c49492bb583d0ead3
parent 4c675c36919d5326fc6d826e0adda8836ffe919c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 27 Jan 2024 16:04:04 +0100

cmd/chroot: Remove _POSIX_C_SOURCE, chroot(2) isn't

Diffstat:

Mcmd/chroot.c7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/cmd/chroot.c b/cmd/chroot.c @@ -1,9 +1,8 @@ // utils-std: Collection of commonly available Unix tools -// SPDX-FileCopyrightText: 2017-2023 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +// SPDX-FileCopyrightText: 2017-2024 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> // SPDX-License-Identifier: MPL-2.0 -#define _POSIX_C_SOURCE 200809L -#define _DEFAULT_SOURCE // chroot +#define _DEFAULT_SOURCE // chroot isn't POSIX #include <assert.h> // assert #include <errno.h> // errno #include <stdbool.h> // false @@ -29,7 +28,7 @@ main(int argc, char *argv[]) if(chdir("/") < 0) { - perror("chdir"); + perror("chroot: chdir"); return 125; }