summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spiers <orgmode@adamspiers.org>2020-10-25 10:57:25 +0000
committerKyle Meyer <kyle@kyleam.com>2020-10-28 23:40:40 -0400
commit2b3bbf361813ee9082d17dc86a77a8b8b87848af (patch)
tree3e6b877e6335ed06e6f7be33597958b5d806b9e2
parentae7b29047d05974c2cb23a279c16c45128fc89ad (diff)
downloadorg-mode-2b3bbf361813ee9082d17dc86a77a8b8b87848af.tar.gz
x11idle: Make installation a little smoother
Fix a -Wimplicit-int compiler warning, and make it more obvious how to obtain scrnsaver.h on three of the most popular Linux distros. Signed-off-by: Adam Spiers <orgmode@adamspiers.org>
-rw-r--r--contrib/scripts/x11idle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/scripts/x11idle.c b/contrib/scripts/x11idle.c
index 22cefe1..b8db275 100644
--- a/contrib/scripts/x11idle.c
+++ b/contrib/scripts/x11idle.c
@@ -1,4 +1,9 @@
+/* This header file is provided by the libxss-dev package on Debian,
+ * by the libXss-devel rpm on openSUSE, and the libXScrnSaver-devel
+ * rpm on Fedora.
+ */
#include <X11/extensions/scrnsaver.h>
+
#include <stdio.h>
/* Based on code from
@@ -7,7 +12,7 @@
* compile with 'gcc -l Xss x11idle.c -o x11idle' and copy x11idle into your
* path
*/
-main() {
+int main() {
XScreenSaverInfo *info = XScreenSaverAllocInfo();
//open the display specified by the DISPLAY environment variable
Display *display = XOpenDisplay(0);