Skip to content
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,20 @@ jobs:
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }}

windows-lean:
runs-on: windows-2025 # latest
env:
CFLAGS: "-DWIN32_LEAN_AND_MEAN"
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CRT_CI_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }}

windows-debug:
runs-on: windows-2025 # latest
steps:
Expand Down
9 changes: 9 additions & 0 deletions include/aws/io/private/pki_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@
#ifdef _WIN32
/* It's ok to include external headers because this is a PRIVATE header file
* (it is usually a crime to include windows.h from header file) */
# define NOMINMAX
# define NOCRYPT
# include <windows.h>

/* Note: we need defs for crypto definitions, we can get them from windows.h, but
* with lean an mean on they will be missing from windows.h.
* So instead lets have a proper dependency on the header that defines them, and force them
* to not be included in windows.h.
*/
# include <wincrypt.h>
#endif /* _WIN32 */

#ifdef AWS_OS_APPLE
Expand Down
5 changes: 5 additions & 0 deletions source/windows/iocp/iocp_event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
#include <aws/io/logging.h>
#include <aws/io/private/event_loop_impl.h>

/*
* Note: windows.h does not include ntstatus when compiled lean and mean.
* winternl is the proper place to pickup ntstatus
*/
#include <windows.h>
#include <winternl.h>

/* The next set of struct definitions are taken directly from the
windows documentation. We can't include the header files directly
Expand Down
16 changes: 8 additions & 8 deletions tests/socket_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2675,14 +2675,14 @@ static int s_test_parse_ipv4_valid_addresses(struct aws_allocator *allocator, vo
const char *input;
uint32_t expected_network_order;
} test_cases[] = {
{"127.0.0.1", htonl(0x7F000001)}, /* localhost */
{"0.0.0.0", htonl(0x00000000)}, /* any address */
{"255.255.255.255", htonl(0xFFFFFFFF)}, /* broadcast */
{"192.168.1.1", htonl(0xC0A80101)}, /* common private IP */
{"10.0.0.1", htonl(0x0A000001)}, /* private IP */
{"172.16.0.1", htonl(0xAC100001)}, /* private IP */
{"8.8.8.8", htonl(0x08080808)}, /* Google DNS */
{"1.2.3.4", htonl(0x01020304)}, /* simple test case */
{"127.0.0.1", aws_hton32(0x7F000001)}, /* localhost */
{"0.0.0.0", aws_hton32(0x00000000)}, /* any address */
{"255.255.255.255", aws_hton32(0xFFFFFFFF)}, /* broadcast */
{"192.168.1.1", aws_hton32(0xC0A80101)}, /* common private IP */
{"10.0.0.1", aws_hton32(0x0A000001)}, /* private IP */
{"172.16.0.1", aws_hton32(0xAC100001)}, /* private IP */
{"8.8.8.8", aws_hton32(0x08080808)}, /* Google DNS */
{"1.2.3.4", aws_hton32(0x01020304)}, /* simple test case */
};

for (size_t i = 0; i < AWS_ARRAY_SIZE(test_cases); i++) {
Expand Down