diff --git a/modules/gui/qt4/util/registry.cpp b/modules/gui/qt4/util/registry.cpp
index 91b8de330380837d4dd0ae4635c793eb114cb2fb..a6b0d66a889dffd27749666b6edefb7c34fa0ae9 100644
--- a/modules/gui/qt4/util/registry.cpp
+++ b/modules/gui/qt4/util/registry.cpp
@@ -25,6 +25,8 @@
 # include "config.h"
 #endif
 
+#ifdef WIN32
+
 #include "registry.hpp"
 
 QVLCRegistry::QVLCRegistry( HKEY rootKey )
@@ -185,3 +187,4 @@ double QVLCRegistry::ReadRegistryDouble( char *path, char *valueName, double def
     return default_value;
 }
 
+#endif /* WIN32 */