]> git.tdb.fi Git - pmount-gui.git/blobdiff - main.c
Enable strict standards conformance and fix resulting errors
[pmount-gui.git] / main.c
diff --git a/main.c b/main.c
index 916c2e214fce6c636c6eaf5889a012231af990eb..63921300b2bf373105ae557e773295b0d74489c4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,3 +1,5 @@
+/* Required for strdup, snprintf, getopt */
+#define _XOPEN_SOURCE 500
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -7,6 +9,7 @@
 #include <mntent.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <sys/select.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
@@ -427,10 +430,12 @@ Device *get_devices(void)
 
        for(i=0; nodes[i]; ++i)
        {
+               Property *props;
+
                if(verbosity>=1)
                        printf("Examining device %s\n", nodes[i]);
 
-               Property *props = get_device_properties(nodes[i]);
+               props = get_device_properties(nodes[i]);
                if(!props)
                {
                        if(verbosity>=2)