Fixed compiling on real Pi's

Thu, 31 Dec 2015 20:52:28 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 31 Dec 2015 20:52:28 +0100
changeset 480
1992db823b7e
parent 479
0e6a1163e6e3
child 481
3dd5d68f59df

Fixed compiling on real Pi's

brewco/util.c file | annotate | diff | comparison | revisions
brewco/util.h file | annotate | diff | comparison | revisions
--- a/brewco/util.c	Sun Dec 27 20:52:52 2015 +0100
+++ b/brewco/util.c	Thu Dec 31 20:52:28 2015 +0100
@@ -24,7 +24,9 @@
 #include "util.h"
 #include "slcd.h"
 
-
+#ifdef HAVE_WIRINGPI_H
+extern int	lcdHandle;
+#endif
 extern int	slcdHandle;
 
 
@@ -142,7 +144,7 @@
 }
 
 
-
+#ifndef HAVE_WIRINGPI_H
 long millis(void)
 {
     struct timespec	now;
@@ -150,7 +152,7 @@
     clock_gettime(CLOCK_REALTIME , &now);
     return ((now.tv_sec * 1000000000) + now.tv_nsec) / 1000000;
 }
-
+#endif
 
 
 void hlt_status(int value)
--- a/brewco/util.h	Sun Dec 27 20:52:52 2015 +0100
+++ b/brewco/util.h	Thu Dec 31 20:52:28 2015 +0100
@@ -5,7 +5,9 @@
 int  mkdirs(char *, mode_t);
 int  file_exist(char *, int);
 int  file_cp(char *, char *);
+#ifndef HAVE_WIRINGPI_H
 long millis(void);
+#endif
 void hlt_status(int);
 void mlt_status(int);
 void pump_status(int);

mercurial