check for the linux-specific proc filesystem...
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/sts.c
+++ b/sts.c
@@ -34,6 +34,10 @@
time_t now = time (NULL);
FILE *f = fopen ("/proc/uptime", "r");
+ if (f == NULL) {
+ perror ("FOPEN");
+ return EXIT_FAILURE;
+ }
if (fgets (buf, sizeof (buf), f) == NULL) {
perror ("FOPEN");
exit (errno);