Skip to content

Commit

Permalink
main/openrc-settingsd: fix segmentation fault
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnarwhal authored and q66 committed Oct 3, 2024
1 parent 2526dd2 commit 0f167d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions main/openrc-settingsd/patches/localectl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ new file mode 100644
index 0000000..21342f5
--- /dev/null
+++ b/src/localectl.c
@@ -0,0 +1,384 @@
@@ -0,0 +1,388 @@
+/*
+ Copyright 2024 Gnarwhal <[email protected]>
+ Copyright 2024 q66 <[email protected]>
Expand Down Expand Up @@ -646,6 +646,7 @@ index 0000000..21342f5
+ { "machine", required_argument, NULL, 'M' },
+ { "no-ask-password", no_argument, NULL, ARG_NO_ASK_PASSWORD },
+ { "no-convert", no_argument, NULL, ARG_NO_CONVERT },
+ {},
+ };
+
+ int c;
Expand All @@ -655,6 +656,7 @@ index 0000000..21342f5
+ g_assert (argc >= 0);
+ g_assert (argv);
+
+ const char * badopt;
+ while ((c = getopt_long (argc, argv, "h", options, NULL)) >= 0) {
+ switch (c) {
+ case 'h':
Expand All @@ -674,7 +676,9 @@ index 0000000..21342f5
+ break;
+
+ default:
+ warn ("invalid option -- '%c'", c);
+ badopt = argv[optind - 1];
+ while (*++badopt == '-');
+ warn ("invalid option -- '%s'", badopt);
+ return 1;
+ }
+ }
Expand Down
2 changes: 1 addition & 1 deletion main/openrc-settingsd/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "openrc-settingsd"
pkgver = "1.5.0"
pkgrel = 3
pkgrel = 4
build_style = "meson"
configure_args = ["-Dopenrc=disabled", "-Denv-update="]
hostmakedepends = ["meson", "pkgconf"]
Expand Down

0 comments on commit 0f167d1

Please sign in to comment.