From 31351a0dc0d9177ce0e9fc8ffc741f13880c71dd Mon Sep 17 00:00:00 2001
From: Oleg Hahm <oleg@hobbykeller.org>
Date: Mon, 19 May 2014 18:43:55 +0200
Subject: [PATCH] msp430: workaround: define errno values if not provided by
 MSP430 lib

---
 cpu/msp430-common/include/msp430_types.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/cpu/msp430-common/include/msp430_types.h b/cpu/msp430-common/include/msp430_types.h
index e6ad5d9fe5..c2e8030e56 100644
--- a/cpu/msp430-common/include/msp430_types.h
+++ b/cpu/msp430-common/include/msp430_types.h
@@ -2,6 +2,23 @@
 #define MSP430_TYPES_H
 
 #include <sys/_types.h>
+#include <errno.h>
+
+#ifndef EINVAL
+/**
+ * @brief defines EINVAL if MSP430 toolchain is too old to provide it itself
+ *        via errno.h
+ */
+#define EINVAL  (28)
+#endif
+
+#ifndef EOVERFLOW
+/**
+ * @brief defines EOVERFLOW if MSP430 toolchain is too old to provide it itself
+ *        via errno.h
+ */
+#define EOVERFLOW   (65)
+#endif
 
 /** defining signed type for size_t */
 typedef _ssize_t ssize_t;
-- 
GitLab