para_server: Don't link with stat.o.
[paraslash.git] / fade.c
diff --git a/fade.c b/fade.c
index 6b87680..7f88447 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1998-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 #include "para.h"
 #include "fd.h"
 
-#include <stropts.h>
+#include <sys/ioctl.h>
 #include <ctype.h>
 #include <stdlib.h> /* EXIT_SUCCESS */
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
 #include <limits.h>
-#include <linux/soundcard.h>
+#include <sys/soundcard.h>
 #include "string.h"
 #include "error.h"
 
@@ -28,7 +28,7 @@
 INIT_FADE_ERRLISTS;
 struct fade_args_info conf;
 
-void para_log(__a_unused int ll, const char *fmt,...)
+__printf_2_3 void para_log(__a_unused int ll, const char *fmt, ...)
 {
        va_list argp;
        time_t t1;
@@ -238,7 +238,10 @@ static int sweet_dreams(void)
                if (ret < 0)
                        return ret;
        }
-       change_afs_mode_and_play(sleep_mode);
+       if (conf.sleep_mode_given)
+               change_afs_mode_and_play(sleep_mode);
+       else
+               client_cmd("stop");
        if (!wf)
                return 1;
        for (;;) {