void-packages/srcpkgs/i3/patches/musl.patch

42 lines
1.0 KiB
Diff

--- ./libi3/resolve_tilde.c.orig 2015-10-07 20:13:31.744138877 -0400
+++ ./libi3/resolve_tilde.c 2015-10-07 20:16:03.268127887 -0400
@@ -18,6 +18,7 @@
* or multiple matches are found, it just returns a copy of path as given.
*
*/
+#ifdef GLOB_TILDE
char *resolve_tilde(const char *path) {
static glob_t globbuf;
char *head, *tail, *result;
@@ -43,3 +44,8 @@
return result;
}
+#else
+char *resolve_tilde(const char *path) {
+ return strdup(path);
+}
+#endif
--- ./i3bar/src/main.c.orig 2015-10-07 20:17:02.226123611 -0400
+++ ./i3bar/src/main.c 2015-10-07 20:20:58.476106477 -0400
@@ -44,6 +44,7 @@
* Glob path, i.e. expand ~
*
*/
+#ifdef GLOB_TILDE
char *expand_path(char *path) {
static glob_t globbuf;
if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) {
@@ -54,6 +55,11 @@
globfree(&globbuf);
return result;
}
+#else
+char *expand_path(char *path) {
+ return strdup(path);
+}
+#endif
void print_usage(char *elf_name) {
printf("Usage: %s -b bar_id [-s sock_path] [-h] [-v]\n", elf_name);