diff --git a/ghc/compiler/utils/PrimPacked.lhs b/ghc/compiler/utils/PrimPacked.lhs
index cf36882936ba8806fb56f7860d6be7d4ebee970a..2578d4aba134b96f0f23940d30e15e1cfdca610d 100644
--- a/ghc/compiler/utils/PrimPacked.lhs
+++ b/ghc/compiler/utils/PrimPacked.lhs
@@ -34,6 +34,10 @@ import GlaExts
 import Addr	( Addr(..) )
 import ST
 import Foreign
+-- ForeignObj is now exported abstractly.
+#if __GLASGOW_HASKELL__ >= 303
+import PrelForeign   ( ForeignObj(..) )
+#endif
 
 #if __GLASGOW_HASKELL__ < 301
 import ArrBase  	( StateAndMutableByteArray#(..),