Skip to content

fix: remove unneeded windows check#3214

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
Micron-TPG-OSS:fix--remove-unneeded-windows-check
Mar 30, 2026
Merged

fix: remove unneeded windows check#3214
igaw merged 1 commit intolinux-nvme:masterfrom
Micron-TPG-OSS:fix--remove-unneeded-windows-check

Conversation

@bcapener
Copy link
Copy Markdown
Contributor

@bcapener bcapener commented Mar 27, 2026

The original code we had in our PR #3129

is_static = get_option('default_library') == 'static'
have_netdb = false
if not is_static and host_system != 'windows'
    have_netdb = cc.links(
        '''#include <sys/types.h>
        #include <sys/socket.h>
        #include <netdb.h>
        int main(int argc, char **argv) {
            struct addrinfo hints, *result;
            return getaddrinfo(argv[1], argv[2], &hints, &result);
        }
        ''',
        name: 'netdb',
    )
endif

before the changes got merged the code was changed in the PR #3213 to...

is_static = get_option('default_library') == 'static' and host_system != 'windows'
have_netdb = false
if not is_static
    have_netdb = cc.links(
    ...
endif

Looking closer at it, we don't need to check for windows now that we are using the MSYS2 environment.

@bcapener bcapener force-pushed the fix--remove-unneeded-windows-check branch from a1c4970 to 40d256a Compare March 27, 2026 22:22
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Mar 28, 2026

Okay, sounds reasonable.

Please add some rational to the commit message. We never know for how long a forge is usable, so we might have to move at some point. Thus commit message should carry the important information. It's obviously nice to have something on github but the git history is really important.

@bcapener bcapener force-pushed the fix--remove-unneeded-windows-check branch 2 times, most recently from ead2d3f to c01ebbb Compare March 30, 2026 13:52
Upon further investigation this Windows check is no longer needed
now that we are using the MSYS2 environment. The code used to check
whether netdb is supported, `have_netdb`, compiles on MSYS2 and
does not produce errors during build configuration.

Signed-off-by: Brandon Capener <[email protected]>
@bcapener bcapener force-pushed the fix--remove-unneeded-windows-check branch from c01ebbb to 29c934e Compare March 30, 2026 13:58
@bcapener bcapener marked this pull request as ready for review March 30, 2026 13:59
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Mar 30, 2026

Thanks!

@igaw igaw merged commit db0b6a3 into linux-nvme:master Mar 30, 2026
29 checks passed
@bcapener bcapener deleted the fix--remove-unneeded-windows-check branch March 30, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants