1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 21:19:41 +02:00
openwrt-packages/cgminer/patches/0001-add-roundl-define.patch

16 lines
350 B
Diff
Raw Normal View History

2012-07-23 07:38:47 +03:00
diff --git a/miner.h b/miner.h
index 120d763..7b7d6d5 100644
--- a/miner.h
+++ b/miner.h
@@ -159,6 +159,10 @@ void *alloca (size_t);
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#endif
+#ifndef roundl
+#define roundl(x) (long double)((long long)((x==0)?0.0:((x)+((x)>0)?0.5:-0.5)))
+#endif
+
enum alive {
LIFE_WELL,
LIFE_SICK,