--- utils/ir-ctl/ir-ctl.c.orig	2017-01-25 17:27:44.373665101 +0000
+++ utils/ir-ctl/ir-ctl.c	2017-01-25 17:27:51.052665445 +0000
@@ -44,6 +44,24 @@
 
 # define N_(string) string
 
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+  (__extension__                                                   \
+    ({ long int __result;                                          \
+       do __result = (long int) (expression);                      \
+       while (__result == -1L && errno == EINTR);                  \
+       __result; }))
+#endif
+
+#ifndef strndupa
+#define strndupa(s, n) \
+       (__extension__ ({const char *__in = (s);                    \
+                        size_t __len = strnlen (__in, (n)) + 1;    \
+                        char *__out = (char *) alloca (__len);     \
+                        __out[__len-1] = '\0';                     \
+                        (char *) memcpy (__out, __in, __len-1);}))
+#endif
+
 
 /* See drivers/media/rc/ir-lirc-codec.c line 23 */
 #define LIRCBUF_SIZE	512
