diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-02-13 08:07:19 -0500 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-02-13 08:07:19 -0500 |
commit | 6c532b986e2a05bf666a8409cf130651e8461874 (patch) | |
tree | 396c284cb4098e8b0f65ca41fe7fb6d4dede7abf /src/main.c | |
parent | 4800bf1e4a3706b6829ccc875d040a64a8d17aad (diff) |
fix warning from missing include
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -24,6 +24,7 @@ #include <stdio.h> #include <unistd.h> #include <errno.h> +#include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -241,10 +242,10 @@ main (int argc, /* make a new pid file */ if ((pf = open (CONSOLE_KIT_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) > 0) { - snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ()); - written = write (pf, pid, strlen (pid)); - close (pf); - g_atexit (delete_pid); + snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ()); + written = write (pf, pid, strlen (pid)); + close (pf); + g_atexit (delete_pid); } manager = ck_manager_new (); |