]> git.sesse.net Git - vlc/blobdiff - compat/getpid.c
shine: avoid double free
[vlc] / compat / getpid.c
index 6554df4abe7239164b4f1d949e49d80e37cc80bd..d6275e7df357a854e6c59ab7d3854fd0c729cfdc 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
 #endif
 
 #include <sys/types.h>
-#ifdef WIN32
+#ifdef _WIN32
 # include <windows.h>
 #endif
 
 pid_t getpid (void)
 {
-#ifdef WIN32
+#if defined (_WIN32)
     return (pid_t) GetCurrentProcessId ();
+#elif defined (__native_client__)
+    return 1;
 #else
 # error Unimplemented!
 #endif