diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac
index 90da008aab135bb2d8b08ce234cc42be0dc78311..1412c23b448237a8ded76f9a028789ab62cd2ddf 100644
--- a/linphone/oRTP/configure.ac
+++ b/linphone/oRTP/configure.ac
@@ -98,6 +98,8 @@ case "$target_os" in
 		AC_DEFINE(NOCONNECT,1,[Defined if we should not use connect() on udp sockets])
 		PTHREAD_LDFLAGS="-pthread"
 		;;
+	*mingw32ce)
+		CFLAGS="$CFLAGS -D_WIN32_WCE";;
 	*mingw*)
 		CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DORTP_STATIC"
 		LIBS="$LIBS -lws2_32 -liphlpapi -lwinmm"
diff --git a/linphone/oRTP/src/port.c b/linphone/oRTP/src/port.c
index 88ef75b2126d1a9ee8610255361dd3c470d84207..73680f6594f73fa1aebf3aa018c203cedcae0c40 100644
--- a/linphone/oRTP/src/port.c
+++ b/linphone/oRTP/src/port.c
@@ -225,7 +225,7 @@ int WIN_thread_create(ortp_thread_t *th, void *attr, void * (*func)(void *), voi
     thread_param_t *params=ortp_new(thread_param_t,1);
     params->func=func;
     params->arg=data;
-	*th=(HANDLE)_beginthreadex( NULL, 0, thread_starter, params, 0, NULL);
+	*th=(HANDLE)_beginthreadex( NULL, 0, (LPTHREAD_START_ROUTINE)thread_starter, params, 0, NULL);
 	return 0;
 }
 
diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site
new file mode 100644
index 0000000000000000000000000000000000000000..f682f17bbd39b09426e60ddeace040e11f961f7b
--- /dev/null
+++ b/linphone/scripts/cegcc-config.site
@@ -0,0 +1,14 @@
+# -*- shell-script -*-
+
+
+ARCH=arm4l
+SDK_BIN_PATH=/opt/mingw32ce/bin     
+SYSROOT_PATH=/opt/mingw32ce
+
+CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -std=c99  -isysroot=${SYSROOT_PATH}"
+LD="${SDK_BIN_PATH}/arm-mingw32ce-ld "
+AR=${SDK_BIN_PATH}/arm-mingw32ce-ar
+RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib
+
+CPPFLAGS="-Dasm=__asm"
+#LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}"