Ported WSL2 fix from HeartGold

This commit is contained in:
AnonymousRandomPerson 2023-08-28 00:09:02 -04:00
parent 3737a9f543
commit dd0867bb17

View File

@ -3,7 +3,15 @@ WSLENV ?= no
ifeq ($(WSLENV),no)
NOWINE = 0
else
# As of build 17063, WSLENV is defined in both WSL1 and WSL2
# so we need to use the kernel release to detect between
# the two.
UNAME_R := $(shell uname -r)
ifeq ($(findstring WSL2,$(UNAME_R)),)
NOWINE = 1
else
NOWINE = 0
endif
endif
ifeq ($(OS),Windows_NT)