Skip to content

Fix desktop_drop Linux snap build failure due to missing stdlib.h include #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/desktop_drop/linux/desktop_drop_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <flutter_linux/flutter_linux.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <sys/utsname.h>

#define DESKTOP_DROP_PLUGIN(obj) \
Expand Down Expand Up @@ -66,7 +67,7 @@ static void desktop_drop_plugin_class_init(DesktopDropPluginClass *klass) {
}

static void desktop_drop_plugin_init(DesktopDropPlugin *self) {
const char * desktopEnv = std::getenv("XDG_CURRENT_DESKTOP");
const char * desktopEnv = getenv("XDG_CURRENT_DESKTOP");
if (desktopEnv) {
const char * lowercaseDesktopEnv = g_ascii_strdown(desktopEnv, -1);

Expand Down