Skip to content

Commit

Permalink
Add wvWare data dir patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Aug 25, 2024
1 parent 77fb35f commit 38eb9b0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipes/wvware/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ patches:
- patch_file: "patches/wv-1.2.9-gcc14-build-fix.patch"

- patch_file: "patches/printf-redirect.patch"
- patch_file: "patches/wvWare-data-dir.patch"
27 changes: 27 additions & 0 deletions recipes/wvware/all/patches/wvWare-data-dir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- wvWare.c
+++ wvWare.c
@@ -1604,6 +1604,15 @@
return (0);
}

+const char *get_data_dir()
+{
+ const char *data_dir = getenv("WVDATADIR");
+ if (NULL == data_dir) {
+ data_dir = WVDATADIR;
+ }
+ return data_dir;
+}
+
int
wvOpenConfig (state_data *myhandle,char *config)
{
@@ -1618,7 +1627,7 @@

if(tmp == NULL)
{
- str_copy (buf, sizeof(buf), WVDATADIR);
+ str_copy (buf, sizeof(buf), get_data_dir());
str_append(buf, sizeof(buf), "/");
str_append(buf, sizeof(buf), config);
config = buf;

0 comments on commit 38eb9b0

Please sign in to comment.