diff --git a/cabal-testsuite/PackageTests/ForeignLibs/MyForeignLib.def b/cabal-testsuite/PackageTests/ForeignLibs/MyForeignLib.def
new file mode 100644
index 0000000000000000000000000000000000000000..b9438c8d6a0e05d5ac6d0fa2d73ff05a40b6a1de
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ForeignLibs/MyForeignLib.def
@@ -0,0 +1,4 @@
+EXPORTS
+  sayHi
+  myForeignLibExit
+  myForeignLibInit
diff --git a/cabal-testsuite/PackageTests/ForeignLibs/my-foreign-lib.cabal b/cabal-testsuite/PackageTests/ForeignLibs/my-foreign-lib.cabal
index 8b63dc24e9e8ca90b4064f50b0ca82801a98f397..43a5a6555674b8b44f34a74ff96ee2dd41092643 100644
--- a/cabal-testsuite/PackageTests/ForeignLibs/my-foreign-lib.cabal
+++ b/cabal-testsuite/PackageTests/ForeignLibs/my-foreign-lib.cabal
@@ -16,7 +16,8 @@ foreign-library myforeignlib
   type:                native-shared
 
   if os(windows)
-    options: standalone
+    options:      standalone
+    mod-def-file: MyForeignLib.def
 
   other-modules:       MyForeignLib.Hello
                        MyForeignLib.SomeBindings
diff --git a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
index 73d02e90987b54ec42a6cce1d7cb31bfd9d749ad..07a01cd0323dfd7232c2c914d10a8b0c50c1d23f 100644
--- a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
+++ b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
@@ -28,8 +28,7 @@ main = setupAndCabalTest . recordMode DoNotRecord $ do
   -- Foreign libraries don't work with GHC 7.6 and earlier
   skipUnlessGhcVersion ">= 7.8"
   ghc94 <- isGhcVersion ">= 9.4.1"
-  expectBrokenIf (isWindows && ghc94) 8451 $
-    withPackageDb $ do
+  withPackageDb $ do
         setup_install []
         setup "copy" [] -- regression test #4156
         dist_dir <- fmap testDistDir getTestEnv