Please address these individually, on a per-feature basis, independent of any platform or operating system. See https://github.com/xbmc/xbmc/commit/79c4903d48a96ca71686d61700b3e868f528d1d7 as an example. I'm going to start being very firm about these. We've been very bad about ifdef'ing per-platform in the past.

This way new ports will just work (tm).

Hint:
```
#ifndef S_ISDIR
#define S_ISDIR(mode) ((mode) & S_IFMT) == S_IDIR
#endif
```

Please do the same for the others as well, I'll spare you the nags on each of them ;)