$OpenBSD: patch-include_speechd_types_h,v 1.1 2013/04/17 16:26:35 ajacoutot Exp $

TEMP_FAILURE_RETRY chunk taken from Debian via gnubiff
(/usr/include/unistd.h in Debian is LGPL)

--- include/speechd_types.h.orig	Wed Apr 17 17:41:46 2013
+++ include/speechd_types.h	Wed Apr 17 17:41:53 2013
@@ -116,4 +116,17 @@ typedef struct {
 	SPDVoice voice;
 } SPDMsgSettings;
 
+/* TEMP_FAILURE_RETRY seems to be available only on Linux. For systems that
+ * don't have this macro we provide our own version. This code was taken from
+ * file "/usr/include/unistd.h" from Debian package "libc6-dev"
+ * version 2.3.2.ds1-20. */
+#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
+
 #endif /* not ifndef SPEECHD_TYPES */
