diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index e22a7d711936f5d2f17a9a05c1bfd557d3bdfcfc..528aff44d75de2ada9208765e56ef59c5a18a52f 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -33,14 +33,14 @@
  * Preamble
  *****************************************************************************/
 
-#import <Cocoa/Cocoa.h>
-#import <OpenGL/OpenGL.h>
-#import <dlfcn.h>
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
+#import <Cocoa/Cocoa.h>
+#import <OpenGL/OpenGL.h>
+#import <dlfcn.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>