app/usb_webcam: initialize libc environment

Restores debugging with LIBUSB_DEBUG=<level>.
This commit is contained in:
Christian Helmuth 2024-10-01 15:15:36 +02:00
parent f324aa902b
commit bfce470690

View File

@ -19,6 +19,7 @@
#include <base/log.h>
#include <gui_session/connection.h>
#include <libc/component.h>
#include <libc/args.h>
#include <os/pixel_rgb888.h>
#pragma GCC diagnostic push
@ -295,7 +296,17 @@ class Main
};
extern char **environ;
void Libc::Component::construct(Libc::Env &env)
{
int argc = 0;
char **argv = nullptr;
char **envp = nullptr;
populate_args_and_env(env, argc, argv, envp);
environ = envp;
static Main main(env);
}