From 9e3d833015f9181ac7f444aff9c5d2de4b70d391 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 17 Nov 2015 10:57:31 +0000
Subject: [PATCH 09/14] Rename poll.h to vm_poll.h

musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this
we rename poll.h to vm_poll.h.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 open-vm-tools/lib/asyncsocket/asyncsocket.c                          | 2 +-
 open-vm-tools/lib/hgfsServer/hgfsServer.c                            | 2 +-
 open-vm-tools/lib/include/asyncsocket.h                              | 2 +-
 open-vm-tools/lib/include/pollImpl.h                                 | 2 +-
 open-vm-tools/lib/include/{poll.h => vm_poll.h}                      | 0
 open-vm-tools/lib/rpcIn/rpcin.c                                      | 2 +-
 open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c | 2 +-
 7 files changed, 6 insertions(+), 6 deletions(-)
 rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (100%)

diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c
index 7806e62f..b7618c0c 100644
--- a/open-vm-tools/lib/asyncsocket/asyncsocket.c
+++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c
@@ -52,7 +52,7 @@
 #include "vmware.h"
 #include "asyncsocket.h"
 #include "asyncSocketInt.h"
-#include "poll.h"
+#include "vm_poll.h"
 #include "log.h"
 #include "err.h"
 #include "hostinfo.h"
diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c
index 7996c284..bb94d664 100644
--- a/open-vm-tools/lib/hgfsServer/hgfsServer.c
+++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c
@@ -48,7 +48,7 @@
 #include "hgfsServerOplock.h"
 #include "hgfsDirNotify.h"
 #include "userlock.h"
-#include "poll.h"
+#include "vm_poll.h"
 #include "mutexRankLib.h"
 #include "vm_basic_asm.h"
 #include "unicodeOperations.h"
diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h
index 63a14531..76a4e945 100644
--- a/open-vm-tools/lib/include/asyncsocket.h
+++ b/open-vm-tools/lib/include/asyncsocket.h
@@ -129,7 +129,7 @@ typedef struct AsyncSocket AsyncSocket;
  * Or the client can specify its favorite poll class and locking behavior.
  * Use of IVmdbPoll is only supported for regular sockets and for Attach.
  */
-#include "poll.h"
+#include "vm_poll.h"
 struct IVmdbPoll;
 typedef struct AsyncSocketPollParams {
    int flags;               /* Default 0, only POLL_FLAG_NO_BULL is valid */
diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h
index bcef0460..fd6b3755 100644
--- a/open-vm-tools/lib/include/pollImpl.h
+++ b/open-vm-tools/lib/include/pollImpl.h
@@ -44,7 +44,7 @@
 #define INCLUDE_ALLOW_USERLEVEL
 #include "includeCheck.h"
 
-#include "poll.h"
+#include "vm_poll.h"
 
 /*
  * PollImpl:
diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/vm_poll.h
similarity index 100%
rename from open-vm-tools/lib/include/poll.h
rename to open-vm-tools/lib/include/vm_poll.h
diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c
index 2f3edecb..41614fc1 100644
--- a/open-vm-tools/lib/rpcIn/rpcin.c
+++ b/open-vm-tools/lib/rpcIn/rpcin.c
@@ -57,7 +57,7 @@
 
 #if defined(VMTOOLS_USE_VSOCKET)
 #  include <glib.h>
-#  include "poll.h"
+#  include "vm_poll.h"
 #  include "asyncsocket.h"
 #  include "vmci_defs.h"
 #include "dataMap.h"
diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
index fee0f5ed..3c55efb7 100644
--- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
+++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
@@ -48,7 +48,7 @@
 #include "rpcout.h"
 #include "rabbitmqProxyConst.h"
 #include "vm_basic_types.h"
-#include "poll.h"
+#include "vm_poll.h"
 #ifdef OPEN_VM_TOOLS
 #include "vmci_sockets.h"
 #include "sslDirect.h"
-- 
2.11.0

