Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[awlib] fix mac build #43514

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions ports/awlib/fix-mac-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/io/include/aw/io/mmap_file.h b/io/include/aw/io/mmap_file.h
index 98469732..65e82aac 100644
--- a/io/include/aw/io/mmap_file.h
+++ b/io/include/aw/io/mmap_file.h
@@ -83,18 +83,18 @@ using win32::file_mapping;
inline file_mode get_file_mode(map_perms perms)
{
using mp = map_perms;
- switch (perms) {
- case mp::none:
- case mp::none|mp::exec:
+ switch (static_cast<unsigned>(perms)) {
+ case static_cast<unsigned>(mp::none):
+ case static_cast<unsigned>(mp::none|mp::exec):
return file_mode::none;
- case mp::read:
- case mp::read|mp::exec:
+ case static_cast<unsigned>(mp::read):
+ case static_cast<unsigned>(mp::read|mp::exec):
return file_mode::read;
- case mp::write:
+ case static_cast<unsigned>(mp::write):
return file_mode::write;
- case mp::write|mp::exec:
- case mp::rdwr:
- case mp::rdwr|mp::exec:
+ case static_cast<unsigned>(mp::write|mp::exec):
+ case static_cast<unsigned>(mp::rdwr):
+ case static_cast<unsigned>(mp::rdwr|mp::exec):
return file_mode::read|file_mode::write;
}

diff --git a/types/include/aw/types/byte_buffer.h b/types/include/aw/types/byte_buffer.h
index 82f46934..b38c46a9 100644
--- a/types/include/aw/types/byte_buffer.h
+++ b/types/include/aw/types/byte_buffer.h
@@ -8,6 +8,7 @@
*/
#ifndef aw_types_byte_buffer_h
#define aw_types_byte_buffer_h
+#include <cstdlib>
#include <memory>
namespace aw {
/**
2 changes: 2 additions & 0 deletions ports/awlib/portfile.cmake
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ vcpkg_from_github(
REF ${VERSION}
SHA512 bfb4668abc3db176744bb674a20bf770c6406db522a14191069b8d833414285ca784f042c3ad50404f7f8bc76afe69627dfcf540080e12316abbbfe420955526
HEAD_REF master
PATCHES
fix-mac-build.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
1 change: 1 addition & 0 deletions ports/awlib/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "awlib",
"version-date": "2024-04-06",
"port-version": 1,
"description": "Cross-platform utility library",
"homepage": "https://github.com/absurdworlds/awlib",
"license": "LGPL-3.0-or-later",
5 changes: 5 additions & 0 deletions versions/a-/awlib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8e81b74f7134ef57eeabdfee3984e76eef3a7707",
"version-date": "2024-04-06",
"port-version": 1
},
{
"git-tree": "539db7a8b7652c86c735594e04dc1a1e09647035",
"version-date": "2024-04-06",
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
@@ -386,7 +386,7 @@
},
"awlib": {
"baseline": "2024-04-06",
"port-version": 0
"port-version": 1
},
"aws-c-auth": {
"baseline": "0.8.0",