Try turning on _GNU_SOURCE. This might fix a lot of the compiler warnings on the mingw targets.