You'll have to rework your code for both of those.
getenv: On CE there's no concept of environment variables so you should be able to #if the code that refers to getenv and not affect your CE executable. If you're setting and using environment variables for some internal usage, you'll need to find a different way of implement the functionality. (Using the registry is a common approach taken).
_dup: Looking at the desktop implementation (If you have Visual Studio installed, you can look under the crt\src directory), it looks like you might be able to use DuplicateHandle to implement your own version of _dup. (Depending on how much of _dup you are trying to use).
platform compliance
Ihabd
getenv:
On CE there's no concept of environment variables so you should be able to #if the code that refers to getenv and not affect your CE executable. If you're setting and using environment variables for some internal usage, you'll need to find a different way of implement the functionality. (Using the registry is a common approach taken).
_dup:
Looking at the desktop implementation (If you have Visual Studio installed, you can look under the crt\src directory), it looks like you might be able to use DuplicateHandle to implement your own version of _dup. (Depending on how much of _dup you are trying to use).