--- libtomcrypt-1.18.2/makefile.shared.orig	2023-08-15 13:09:25.578845500 +0200
+++ libtomcrypt-1.18.2/makefile.shared	2023-08-15 13:09:31.236345700 +0200
@@ -23,7 +23,7 @@
     LIBTOOL:=libtool
   endif
 endif
-ifeq ($(PLATFORM), CYGWIN)
+ifneq ($(findstring $(PLATFORM),CYGWIN MINGW32 MINGW64 MSYS),)
   NO_UNDEFINED:=-no-undefined
 endif
 LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC)
