From 1c882c47ff05ea8f8057c581b2d1c6d5443b8489 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Fri, 23 Mar 2007 02:12:53 +0000
Subject: [PATCH] Fix compilation error on BeOS.

---
 ChangeLog  | 4 ++++
 lib/poll.c | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 92ebab0818..727b724580 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-22  Bruno Haible  <bruno@clisp.org>
+
+	* lib/poll.c (MSG_PEEK): New fallback definition.
+
 2007-03-22  Bruno Haible  <bruno@clisp.org>
 
 	* modules/sys_socket-tests (configure.ac): Check for shutdown function.
diff --git a/lib/poll.c b/lib/poll.c
index 2ec7be02dc..ed81dbaafb 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -47,6 +47,11 @@
 #define EOVERFLOW EINVAL
 #endif
 
+/* BeOS does not have MSG_PEEK.  */
+#ifndef MSG_PEEK
+#define MSG_PEEK 0
+#endif
+
 int
 poll (pfd, nfd, timeout)
      struct pollfd *pfd;
-- 
2.39.5