summaryrefslogtreecommitdiffstats
path: root/src/suil_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-03-12 18:44:51 -0500
committerDavid Robillard <d@drobilla.net>2022-03-12 18:44:51 -0500
commit8e4ec24cbf69ea0a40d6981e69320a10ee19529f (patch)
tree56539320de10b13e9bfafcb5bf9d174966b0c13d /src/suil_internal.h
parentca6a33d9f9a45ead274904595c49365483cac8ea (diff)
downloadsuil-8e4ec24cbf69ea0a40d6981e69320a10ee19529f.tar.gz
suil-8e4ec24cbf69ea0a40d6981e69320a10ee19529f.tar.bz2
suil-8e4ec24cbf69ea0a40d6981e69320a10ee19529f.zip
fixup! WIP: Switch to Meson
Diffstat (limited to 'src/suil_internal.h')
-rw-r--r--src/suil_internal.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/suil_internal.h b/src/suil_internal.h
index ac6e563..d9449d5 100644
--- a/src/suil_internal.h
+++ b/src/suil_internal.h
@@ -115,19 +115,25 @@ suil_open_module(const char* module_name)
{
const char* const env_dir = getenv("SUIL_MODULE_DIR");
const char* const mod_dir = env_dir ? env_dir : SUIL_MODULE_DIR;
- const size_t path_len =
- strlen(mod_dir) + strlen(SUIL_DIR_SEP SUIL_MODULE_PREFIX SUIL_MODULE_EXT) +
- strlen(module_name) + 2;
-
- char* const path = (char*)calloc(path_len, 1);
- snprintf(path,
- path_len,
- "%s%s%s%s%s",
- mod_dir,
- SUIL_DIR_SEP,
- SUIL_MODULE_PREFIX,
- module_name,
- SUIL_MODULE_EXT);
+
+ const size_t path_len = strlen(mod_dir) + strlen(SUIL_DIR_SEP) +
+ strlen(SUIL_MODULE_PREFIX) + strlen(module_name) +
+ strlen(SUIL_MODULE_EXT);
+
+ char* const path = (char*)calloc(path_len + 1, 1);
+ strcat(path, mod_dir);
+ strcat(path, SUIL_DIR_SEP);
+ strcat(path, SUIL_MODULE_PREFIX);
+ strcat(path, module_name);
+ strcat(path, SUIL_MODULE_EXT);
+ /* snprintf(path, */
+ /* path_len + 1, */
+ /* "%s%s%s%s%s", */
+ /* mod_dir, */
+ /* SUIL_DIR_SEP, */
+ /* SUIL_MODULE_PREFIX, */
+ /* module_name, */
+ /* SUIL_MODULE_EXT); */
dylib_error();
void* lib = dylib_open(path, DYLIB_NOW);