Don't try to use getenv on windows phone/rt
authorMartin Storsjo <martin@martin.st>
Wed, 29 May 2013 17:37:49 +0000 (20:37 +0300)
committerMartin Storsjo <martin@martin.st>
Sun, 4 May 2014 20:47:39 +0000 (23:47 +0300)
The getenv function doesn't exist there. In Visual Studio 2012,
the function still existed in the link libraries even though
it was hidden in the headers, but in the 2013 version it has been
removed from the link libraries as well.

Change-Id: Iea6289a698fa1788e906f5aabb6fddda3675815b

vpx_ports/arm_cpudetect.c

index 542ff6786d3c03b1949987e1d3c463080cb55446..fa0e030b55209698ed9e042c6d419a43a8cb9716 100644 (file)
 #include <string.h>
 #include "arm.h"
 
+#ifdef WINAPI_FAMILY
+#include <winapifamily.h>
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#define getenv(x) NULL
+#endif
+#endif
+
 static int arm_cpu_env_flags(int *flags) {
   char *env;
   env = getenv("VPX_SIMD_CAPS");