瀏覽代碼

getpid returns a pid_t. we all know that's an int. but solaris doesn't know.

svn:r1305
Roger Dingledine 20 年之前
父節點
當前提交
df3f37b84f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/util.c

+ 1 - 1
src/common/util.c

@@ -837,7 +837,7 @@ void write_pidfile(char *filename) {
     log_fn(LOG_WARN, "unable to open %s for writing: %s", filename,
            strerror(errno));
   } else {
-    fprintf(pidfile, "%d", getpid());
+    fprintf(pidfile, "%d", (int)getpid());
     fclose(pidfile);
   }
 #endif