diff --git a/tests/libposix/posix005.hs b/tests/libposix/posix005.hs
index 2988f4c80fe5ceaa47738a464f5a2403bb4018a0..91331ff570399a175acdcc00bdc86b5c28a145e2 100644
--- a/tests/libposix/posix005.hs
+++ b/tests/libposix/posix005.hs
@@ -1,4 +1,4 @@
-
+import Data.List (sort)
 import System.IO
 import System.Posix.Env
 
diff --git a/tests/libposix/posix005.stdout b/tests/libposix/posix005.stdout
index ace79ee2e06003e8d981ac13ed1a45f92293c1bb..4f6005430bc90a4b32e3f0ab609501f2b0cd871a 100644
--- a/tests/libposix/posix005.stdout
+++ b/tests/libposix/posix005.stdout
@@ -1,7 +1,7 @@
 vt100
 [("one","1"),("two","2")]
-[("one","1"),("two","2"),("foo","bar")]
-[("one","1"),("two","2"),("foo","baz")]
-[("one","1"),("two","2"),("foo","baz"),("fu","bar")]
-[("one","1"),("two","2"),("fu","bar")]
+[("foo","bar"),("one","1"),("two","2")]
+[("foo","baz"),("one","1"),("two","2")]
+[("foo","baz"),("fu","bar"),("one","1"),("two","2")]
+[("fu","bar"),("one","1"),("two","2")]
 []