[pulseaudio-discuss] [PATCH 01/10] Clean up <poll.h> includes
Maarten Bosmans
mkbosmans at gmail.com
Wed Jan 5 17:39:48 PST 2011
Instead <pulsecore/poll.h> should be included. That file includes poll.h on
platform where it is appropriate. Also remove some unnecessary <ioctl.h>
includes.
---
src/daemon/main.c | 4 ----
src/modules/bluetooth/module-bluetooth-device.c | 3 +--
src/modules/module-esound-sink.c | 3 ++-
src/modules/module-pipe-sink.c | 2 +-
src/modules/module-pipe-source.c | 2 +-
src/modules/module-sine-source.c | 2 --
src/modules/oss/module-oss.c | 2 +-
src/modules/rtp/module-rtp-recv.c | 2 +-
src/pulse/thread-mainloop.c | 7 +------
src/pulsecore/lock-autospawn.c | 1 -
10 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/src/daemon/main.c b/src/daemon/main.c
index cad6f70..0db794b 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -43,10 +43,6 @@
#include <sys/mman.h>
#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 6d31c1e..dc09ffc 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -25,8 +25,6 @@
#include <string.h>
#include <errno.h>
-#include <poll.h>
-#include <sys/ioctl.h>
#include <linux/sockios.h>
#include <arpa/inet.h>
@@ -44,6 +42,7 @@
#include <pulsecore/socket-util.h>
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
+#include <pulsecore/poll.h>
#include <pulsecore/rtpoll.h>
#include <pulsecore/time-smoother.h>
#include <pulsecore/namereg.h>
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 02541e6..0d04fff 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -31,7 +31,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
-#include <poll.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -60,6 +59,8 @@
#include <pulsecore/thread.h>
#include <pulsecore/time-smoother.h>
#include <pulsecore/socket-util.h>
+#include <pulsecore/rtpoll.h>
+#include <pulsecore/poll.h>
#include "module-esound-sink-symdef.h"
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index e26cbf6..4ed91aa 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <limits.h>
#include <sys/ioctl.h>
-#include <poll.h>
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
@@ -49,6 +48,7 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/poll.h>
#include "module-pipe-sink-symdef.h"
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 1a6607d..c50536e 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <limits.h>
#include <sys/ioctl.h>
-#include <sys/poll.h>
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
@@ -49,6 +48,7 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/poll.h>
#include "module-pipe-source-symdef.h"
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index c66099c..955834f 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -31,7 +31,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
-#include <sys/ioctl.h>
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
@@ -47,7 +46,6 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
-#include <pulsecore/poll.h>
#include "module-sine-source-symdef.h"
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index ba9b99e..c9dc4e7 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -53,7 +53,6 @@
#include <unistd.h>
#include <limits.h>
#include <signal.h>
-#include <poll.h>
#include <pulse/xmalloc.h>
#include <pulse/util.h>
@@ -70,6 +69,7 @@
#include <pulsecore/macro.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/poll.h>
#if defined(__NetBSD__) && !defined(SNDCTL_DSP_GETODELAY)
#include <sys/audioio.h>
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 7dbb1ef..7635a80 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -31,7 +31,6 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include <poll.h>
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
@@ -55,6 +54,7 @@
#include <pulsecore/time-smoother.h>
#include <pulsecore/socket-util.h>
#include <pulsecore/once.h>
+#include <pulsecore/poll.h>
#include "module-rtp-recv-symdef.h"
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index c3cf49c..d8c82c8 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -31,12 +31,6 @@
#include <signal.h>
#include <stdio.h>
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#else
-#include <pulsecore/poll.h>
-#endif
-
#include <pulse/xmalloc.h>
#include <pulse/mainloop.h>
#include <pulse/i18n.h>
@@ -46,6 +40,7 @@
#include <pulsecore/thread.h>
#include <pulsecore/mutex.h>
#include <pulsecore/macro.h>
+#include <pulsecore/poll.h>
#include "thread-mainloop.h"
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
index 422f5eb..b515057 100644
--- a/src/pulsecore/lock-autospawn.c
+++ b/src/pulsecore/lock-autospawn.c
@@ -26,7 +26,6 @@
#include <fcntl.h>
#include <errno.h>
#include <string.h>
-#include <sys/poll.h>
#include <signal.h>
#include <pthread.h>
--
1.7.1
More information about the pulseaudio-discuss
mailing list