summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-02-13 08:07:19 -0500
committerWilliam Jon McCann <mccann@jhu.edu>2007-02-13 08:07:19 -0500
commit6c532b986e2a05bf666a8409cf130651e8461874 (patch)
tree396c284cb4098e8b0f65ca41fe7fb6d4dede7abf /src/main.c
parent4800bf1e4a3706b6829ccc875d040a64a8d17aad (diff)
fix warning from missing include
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 461318e..769eb8f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 ();