logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: 2718c9d1ec9bbdc7394b342372c1943162ba1967
parent 69d6a5f427935c412fe4cc318c7b3d6fd4530e63
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 23 Jun 2024 21:02:55 +0200

init.c: Drop _GNU_SOURCE, SUS has environ defined

Diffstat:

Minit.c5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/init.c b/init.c @@ -2,8 +2,7 @@ // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> // SPDX-License-Identifier: MPL-2.0 -// environ -#define _GNU_SOURCE +#define _POSIX_C_SOURCE 200809L #include "loksh_tcc.h" @@ -19,6 +18,8 @@ #include <sys/wait.h> // waitpid #include <unistd.h> // chdir, environ +/* From SUS Chapter 8: Environment variable */ +extern char **environ; static int exec_wait(char *args[])