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 <orgm...@adamspiers.org>
---
 contrib/scripts/x11idle.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/contrib/scripts/x11idle.c b/contrib/scripts/x11idle.c
index 22cefe1e6..b8db27560 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);
-- 
2.28.0


Reply via email to