Skip to content

Commit b29e87f

Browse files
Copilotboyan01
andauthored
Fix desktop_drop Linux snap build failure due to missing stdlib.h include (#425)
* Initial plan * Fix desktop_drop Linux snap build by replacing std::getenv with getenv Co-authored-by: boyan01 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: boyan01 <[email protected]>
1 parent de2c259 commit b29e87f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/desktop_drop/linux/desktop_drop_plugin.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <flutter_linux/flutter_linux.h>
44
#include <gtk/gtk.h>
5+
#include <stdlib.h>
56
#include <sys/utsname.h>
67

78
#define DESKTOP_DROP_PLUGIN(obj) \
@@ -66,7 +67,7 @@ static void desktop_drop_plugin_class_init(DesktopDropPluginClass *klass) {
6667
}
6768

6869
static void desktop_drop_plugin_init(DesktopDropPlugin *self) {
69-
const char * desktopEnv = std::getenv("XDG_CURRENT_DESKTOP");
70+
const char * desktopEnv = getenv("XDG_CURRENT_DESKTOP");
7071
if (desktopEnv) {
7172
const char * lowercaseDesktopEnv = g_ascii_strdown(desktopEnv, -1);
7273

0 commit comments

Comments
 (0)