]> git.sesse.net Git - vlc/blobdiff - compat/getpid.c
compat: (pretend to) implement getpid() on NaCl
[vlc] / compat / getpid.c
index 6554df4abe7239164b4f1d949e49d80e37cc80bd..7e120f2c4a5a616252d21b43bd85ee766218f70f 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
 
 pid_t getpid (void)
 {
-#ifdef WIN32
+#if defined (WIN32)
     return (pid_t) GetCurrentProcessId ();
+#elif defined (__native_client__)
+    return 1;
 #else
 # error Unimplemented!
 #endif