--- a/autotests/klocaletest.cpp
+++ b/autotests/klocaletest.cpp
@@ -20,6 +20,9 @@
 #include "klocaletest.h"
 #include <QTest>
 
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
 #include "klocale.h"
 #include "klocale_p.h"
 #include "kconfiggroup.h"

