diff --git a/.github/workflows/build-and-test-macos.yaml b/.github/workflows/build-and-test-macos.yaml index f71431186f..0bbee768f8 100644 --- a/.github/workflows/build-and-test-macos.yaml +++ b/.github/workflows/build-and-test-macos.yaml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["macos-13", "macos-14"] + os: ["macos-14", "macos-15", "macos-15-intel", "macos-26"] otp: ["24", "25", "26"] steps: diff --git a/src/platforms/generic_unix/lib/sys.c b/src/platforms/generic_unix/lib/sys.c index f0951e178c..c8a3c3486e 100644 --- a/src/platforms/generic_unix/lib/sys.c +++ b/src/platforms/generic_unix/lib/sys.c @@ -525,16 +525,14 @@ Context *sys_create_port(GlobalContext *glb, const char *driver_name, term opts) #ifdef DYNLOAD_PORT_DRIVERS void *handle; { - char port_driver_name[64 + strlen("avm_" - "_port_driver.so") - + 1]; + char port_driver_name[64 + sizeof("avm_") - 1 + sizeof("_port_driver.so") - 1 + 1]; snprintf(port_driver_name, sizeof(port_driver_name), "./avm_%s_port_driver.so", driver_name); handle = dlopen(port_driver_name, RTLD_NOW); if (!handle) { return NULL; } } - char port_driver_func_name[64 + strlen("_create_port") + 1]; + char port_driver_func_name[64 + sizeof("_create_port") - 1 + 1]; snprintf(port_driver_func_name, sizeof(port_driver_func_name), "%s_create_port", driver_name); create_port_t create_port = (create_port_t) CAST_VOID_TO_FUNC_PTR(dlsym(handle, port_driver_func_name));