Index: /lm-sensors/trunk/lib/init.c
===================================================================
--- /lm-sensors/trunk/lib/init.c	(revision 5665)
+++ /lm-sensors/trunk/lib/init.c	(revision 5730)
@@ -24,4 +24,5 @@
 
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <locale.h>
 #include <stdlib.h>
@@ -30,4 +31,5 @@
 #include <errno.h>
 #include <dirent.h>
+#include <unistd.h>
 #include "sensors.h"
 #include "data.h"
@@ -121,6 +123,5 @@
 static int config_file_filter(const struct dirent *entry)
 {
-	return (entry->d_type == DT_REG || entry->d_type == DT_LNK)
-	    && entry->d_name[0] != '.';		/* Skip hidden files */
+	return entry->d_name[0] != '.';		/* Skip hidden files */
 }
 
@@ -144,4 +145,5 @@
 		char path[PATH_MAX];
 		FILE *input;
+		struct stat st;
 
 		len = snprintf(path, sizeof(path), "%s/%s", dir,
@@ -151,4 +153,8 @@
 			continue;
 		}
+
+		/* Only accept regular files */
+		if (stat(path, &st) < 0 || !S_ISREG(st.st_mode))
+			continue;
 
 		input = fopen(path, "r");
Index: /lm-sensors/trunk/CHANGES
===================================================================
--- /lm-sensors/trunk/CHANGES	(revision 5726)
+++ /lm-sensors/trunk/CHANGES	(revision 5730)
@@ -5,4 +5,5 @@
   isadump: Use geteuid instead of getuid so that setuid bit works
   isaset: Use geteuid instead of getuid so that setuid bit works
+  libsensors: Don't rely on dirent->dt_type being set
   Makefile: Include generated source files in dependency checking
             Make it possible to skip building of the static library
