diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index a99a6a50dba667fa0fbb9f023d112e847f7b68b1..6f3da65f29318971a642981f5ea10f768dc4d257 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -18,7 +18,9 @@
  */
 #include "config.h"
 #include "avformat.h"
-#if defined(CONFIG_WIN32) && !defined(CONFIG_WINCE)
+#if defined(CONFIG_WINCE)
+/* Skip includes on WinCE. */
+#elif defined(CONFIG_WIN32)
 #include <sys/types.h>
 #include <sys/timeb.h>
 #elif defined(CONFIG_OS2)