diff --git a/.github/workflows/MSYS2.yml b/.github/workflows/MSYS2.yml index 60d75203c5c..43d7478f91d 100644 --- a/.github/workflows/MSYS2.yml +++ b/.github/workflows/MSYS2.yml @@ -52,6 +52,7 @@ jobs: qt6-webchannel:p qt6-websockets:p x264:p + cc:p - name: Configure and build RetroArch shell: msys2 {0} diff --git a/Makefile.common b/Makefile.common index 3295f828966..ff6e0bb1dc0 100644 --- a/Makefile.common +++ b/Makefile.common @@ -2648,16 +2648,16 @@ ifeq ($(HAVE_ODROIDGO2), 1) gfx/drivers/oga_gfx.o endif - ifneq ($(findstring Win32,$(OS)),) -# This block executes only if $(OS) contains "Win32" -NT_VERSION := $(shell echo "#include " > temp.c; \ - echo "#ifdef _WIN32_WINNT" >> temp.c; \ - echo "#define GET_MACRO_VALUE(x) #x" >> temp.c; \ - echo "#define EXPAND_MACRO_VALUE(x) GET_MACRO_VALUE(x)" >> temp.c; \ - echo "#pragma message (\"_WIN32_WINNT=\" EXPAND_MACRO_VALUE(_WIN32_WINNT))" >> temp.c; \ - echo "#endif" >> temp.c; \ - $(CC) -c temp.c 2>&1 | sed -n 's/^.*_WIN32_WINNT=\(0x[0-9A-Fa-f]\+\).*/\1/p'; \ +ifneq ($(shell sh -c 'command -v sh'),) # Check if we have a Unix shell +# This block executes only if $(OS) contains "Win32" and we're in a Unix shell +NT_VERSION := $(shell echo "#include " > temp.c && \ + echo "#ifdef _WIN32_WINNT" >> temp.c && \ + echo "#define GET_MACRO_VALUE(x) #x" >> temp.c && \ + echo "#define EXPAND_MACRO_VALUE(x) GET_MACRO_VALUE(x)" >> temp.c && \ + echo "#pragma message (\"_WIN32_WINNT=\" EXPAND_MACRO_VALUE(_WIN32_WINNT))" >> temp.c && \ + echo "#endif" >> temp.c && \ + $(CC) -c temp.c 2>&1 | sed -n 's/^.*_WIN32_WINNT=\(0x[0-9A-Fa-f]\+\).*/\1/p' && \ rm -f temp.c temp.o) # Check if NT_VERSION is greater than 0x602 @@ -2669,5 +2669,5 @@ else $(warning Windows NT version macro (_WIN32_WINNT) is not defined.) endif endif - +endif ##################################