Fixed conditionals on systems without wiringPi.

Fri, 15 Aug 2014 14:43:32 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 15 Aug 2014 14:43:32 +0200
changeset 242
d3fe84ece349
parent 241
4ba138737bf4
child 243
ab75ff8e26e1

Fixed conditionals on systems without wiringPi.

thermferm/devices.c file | annotate | diff | comparison | revisions
--- a/thermferm/devices.c	Fri Aug 15 14:38:32 2014 +0200
+++ b/thermferm/devices.c	Fri Aug 15 14:43:32 2014 +0200
@@ -408,12 +408,16 @@
     char		*addr = NULL, line[60], *p = NULL;
     FILE		*fp;
     int			temp, rc;
+#ifdef HAVE_WIRINGPI_H
     time_t		now;
+#endif
 
     syslog(LOG_NOTICE, "Thread my_devices_loop started");
 
-    rc = piHiPri(10);
-    syslog(LOG_NOTICE, "Thread my_devices_loop piHiPri(10) rc=%d", rc);
+#ifdef HAVE_WIRINGPI_H
+    if ((rc = piHiPri(10)))
+    	syslog(LOG_NOTICE, "my_devices_loop: piHiPri(10) rc=%d", rc);
+#endif
 
     /*
      * Loop forever until the external shutdown variable is set.

mercurial