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 | |
parent | 4800bf1e4a3706b6829ccc875d040a64a8d17aad (diff) |
fix warning from missing include
-rw-r--r-- | src/ck-vt-monitor.c | 2 | ||||
-rw-r--r-- | src/main.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c index e56751f..59958d5 100644 --- a/src/ck-vt-monitor.c +++ b/src/ck-vt-monitor.c @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * Copyright (C) 2006 William Jon McCann <mccann@jhu.edu> + * Copyright (C) 2006-2007 William Jon McCann <mccann@jhu.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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 (); |