Skip to content

Commit

Permalink
cmake: fix build on ubuntu 24
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Oct 7, 2024
1 parent 5ff0b81 commit bc87e19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.14.3)
project(chef VERSION "1.3.2")

# on ubuntu 24+ wolfssl craps out on some string operations which
# we do not care about
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-stringop-overflow")

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

option(CHEF_BUILD_TOOLS "Build the bake toolset" ON)
Expand Down
2 changes: 1 addition & 1 deletion libs/chefclient/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int __load_settings(struct chefclient* client, const char* path)
char buff[PATH_MAX];
json_error_t error;

snprintf(&buff[0], sizeof(buff), "%s" CHEF_PATH_SEPARATOR_S "client.json", path);;
snprintf(&buff[0], sizeof(buff), "%s" CHEF_PATH_SEPARATOR_S "client.json", path);

client->settings_path = platform_strdup(&buff[0]);
client->settings = json_load_file(&buff[0], 0, &error);
Expand Down
2 changes: 1 addition & 1 deletion libs/vafs
2 changes: 1 addition & 1 deletion tools/serve/commands/install.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static char* __get_unsafe_infoname(struct chef_package* package, struct chef_ver
return name;
}

static char* __get_safe_infoname(char* publisher, struct chef_package* package, struct chef_version* version)
static char* __get_safe_infoname(const char* publisher, struct chef_package* package, struct chef_version* version)
{
char* name;

Expand Down

0 comments on commit bc87e19

Please sign in to comment.