aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dummyshell.c2
-rw-r--r--xidle.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/dummyshell.c b/dummyshell.c
index 45c49a0..34b975d 100644
--- a/dummyshell.c
+++ b/dummyshell.c
@@ -594,6 +594,8 @@ int main(int argc, char** argv)
break;
case 'm':
#ifdef _HAS_MSG
+ if (lseek(msgfd, 0, SEEK_SET) != -1)
+ while (print_msg() == 0) {}
state = MS_MESSAGE;
#else
printf("<feature disabled>\n");
diff --git a/xidle.c b/xidle.c
index c2794fc..4d0ebd4 100644
--- a/xidle.c
+++ b/xidle.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include <stdbool.h>
#include <X11/Xlib.h>
#include <X11/extensions/scrnsaver.h>