Browse Source

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>
Adam Spiers 4 years ago
parent
commit
2b3bbf3618
1 changed files with 6 additions and 1 deletions
  1. 6 1
      contrib/scripts/x11idle.c

+ 6 - 1
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);