[systemd-devel] [RFC 01/25] include poll.h rather than sys/poll.h

Tom Gundersen teg at jklm.no
Thu Sep 18 09:03:35 PDT 2014


Hm, this one doesn't apply for me. If you rebase and resend I'll apply.

Thanks!

Tom

On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing <systemd at esmil.dk> wrote:
> ---
>  man/sd_journal_get_fd.xml                           | 2 +-
>  src/ask-password/ask-password.c                     | 2 +-
>  src/bus-proxyd/bus-proxyd.c                         | 2 +-
>  src/core/execute.c                                  | 2 +-
>  src/core/manager.c                                  | 2 +-
>  src/core/unit.c                                     | 2 +-
>  src/initctl/initctl.c                               | 2 +-
>  src/journal/sd-journal.c                            | 2 +-
>  src/libsystemd/sd-bus/bus-socket.c                  | 2 +-
>  src/libsystemd/sd-bus/sd-bus.c                      | 2 +-
>  src/libsystemd/sd-login/sd-login.c                  | 2 +-
>  src/libsystemd/sd-login/test-login.c                | 2 +-
>  src/libsystemd/sd-network/sd-network.c              | 2 +-
>  src/libsystemd/sd-resolve/sd-resolve.c              | 2 +-
>  src/libudev/libudev-monitor.c                       | 2 +-
>  src/readahead/readahead-collect.c                   | 2 +-
>  src/reply-password/reply-password.c                 | 2 +-
>  src/resolve/resolved-manager.c                      | 2 +-
>  src/shared/ask-password-api.c                       | 2 +-
>  src/shared/logs-show.c                              | 2 +-
>  src/shared/spawn-polkit-agent.c                     | 2 +-
>  src/shared/util.c                                   | 2 +-
>  src/shared/utmp-wtmp.c                              | 2 +-
>  src/shutdownd/shutdownd.c                           | 2 +-
>  src/tty-ask-password-agent/tty-ask-password-agent.c | 2 +-
>  src/udev/udev-ctrl.c                                | 2 +-
>  src/udev/udev-event.c                               | 2 +-
>  src/udev/udevadm-settle.c                           | 2 +-
>  src/udev/udevadm-test-builtin.c                     | 2 +-
>  src/udev/udevd.c                                    | 2 +-
>  30 files changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
> index 3aa79ce..56c2a75 100644
> --- a/man/sd_journal_get_fd.xml
> +++ b/man/sd_journal_get_fd.xml
> @@ -308,7 +308,7 @@ int main(int argc, char *argv[]) {
>                  example lacks all error checking for the sake of
>                  simplicity):</para>
>
> -                <programlisting>#include <sys/poll.h>
> +                <programlisting>#include <poll.h>
>  #include <systemd/sd-journal.h>
>
>  int wait_for_changes(sd_journal *j) {
> diff --git a/src/ask-password/ask-password.c b/src/ask-password/ask-password.c
> index 5c37cff..2eed25f 100644
> --- a/src/ask-password/ask-password.c
> +++ b/src/ask-password/ask-password.c
> @@ -20,7 +20,7 @@
>  ***/
>
>  #include <sys/socket.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/types.h>
>  #include <assert.h>
>  #include <string.h>
> diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
> index d35d7f6..4de8e85 100644
> --- a/src/bus-proxyd/bus-proxyd.c
> +++ b/src/bus-proxyd/bus-proxyd.c
> @@ -28,7 +28,7 @@
>  #include <unistd.h>
>  #include <string.h>
>  #include <errno.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <stddef.h>
>  #include <getopt.h>
>
> diff --git a/src/core/execute.c b/src/core/execute.c
> index f3c791e..e73eb8e 100644
> --- a/src/core/execute.c
> +++ b/src/core/execute.c
> @@ -37,7 +37,7 @@
>  #include <sys/mount.h>
>  #include <linux/fs.h>
>  #include <linux/oom.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <glob.h>
>  #include <sys/personality.h>
>
> diff --git a/src/core/manager.c b/src/core/manager.c
> index e0c1cd1..88d660d 100644
> --- a/src/core/manager.c
> +++ b/src/core/manager.c
> @@ -25,7 +25,7 @@
>  #include <signal.h>
>  #include <sys/wait.h>
>  #include <unistd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/reboot.h>
>  #include <sys/ioctl.h>
>  #include <linux/kd.h>
> diff --git a/src/core/unit.c b/src/core/unit.c
> index 5978e21..def5c36 100644
> --- a/src/core/unit.c
> +++ b/src/core/unit.c
> @@ -24,7 +24,7 @@
>  #include <string.h>
>  #include <sys/epoll.h>
>  #include <sys/timerfd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <stdlib.h>
>  #include <unistd.h>
>  #include <sys/stat.h>
> diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c
> index f1c2b8d..7f22cb3 100644
> --- a/src/initctl/initctl.c
> +++ b/src/initctl/initctl.c
> @@ -27,7 +27,7 @@
>  #include <stdio.h>
>  #include <errno.h>
>  #include <unistd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/epoll.h>
>  #include <sys/un.h>
>  #include <fcntl.h>
> diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
> index 1fc9f01..fec97c8 100644
> --- a/src/journal/sd-journal.c
> +++ b/src/journal/sd-journal.c
> @@ -24,7 +24,7 @@
>  #include <stddef.h>
>  #include <unistd.h>
>  #include <sys/inotify.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/vfs.h>
>  #include <linux/magic.h>
>
> diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
> index d124d9a..27b2ecf 100644
> --- a/src/libsystemd/sd-bus/bus-socket.c
> +++ b/src/libsystemd/sd-bus/bus-socket.c
> @@ -23,7 +23,7 @@
>  #include <assert.h>
>  #include <stdlib.h>
>  #include <unistd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <byteswap.h>
>
>  #include "util.h"
> diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
> index 28b993b..ff4beed 100644
> --- a/src/libsystemd/sd-bus/sd-bus.c
> +++ b/src/libsystemd/sd-bus/sd-bus.c
> @@ -24,7 +24,7 @@
>  #include <stdlib.h>
>  #include <unistd.h>
>  #include <netdb.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <byteswap.h>
>  #include <sys/mman.h>
>  #include <pthread.h>
> diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
> index 95cb6ff..d2336be 100644
> --- a/src/libsystemd/sd-login/sd-login.c
> +++ b/src/libsystemd/sd-login/sd-login.c
> @@ -23,7 +23,7 @@
>  #include <string.h>
>  #include <errno.h>
>  #include <sys/inotify.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>
>  #include "util.h"
>  #include "cgroup-util.h"
> diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c
> index 28f88a1..2802e82 100644
> --- a/src/libsystemd/sd-login/test-login.c
> +++ b/src/libsystemd/sd-login/test-login.c
> @@ -19,7 +19,7 @@
>    along with systemd; If not, see <http://www.gnu.org/licenses/>.
>  ***/
>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <string.h>
>
>  #include "systemd/sd-login.h"
> diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
> index d63e6f9..c1cb39c 100644
> --- a/src/libsystemd/sd-network/sd-network.c
> +++ b/src/libsystemd/sd-network/sd-network.c
> @@ -24,7 +24,7 @@
>  #include <string.h>
>  #include <errno.h>
>  #include <sys/inotify.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <net/if.h>
>
>  #include "util.h"
> diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c
> index fea695f..6448280 100644
> --- a/src/libsystemd/sd-resolve/sd-resolve.c
> +++ b/src/libsystemd/sd-resolve/sd-resolve.c
> @@ -40,7 +40,7 @@
>  #include <stdint.h>
>  #include <pthread.h>
>  #include <sys/prctl.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>
>  #include "util.h"
>  #include "list.h"
> diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
> index 59698b8..137ea14 100644
> --- a/src/libudev/libudev-monitor.c
> +++ b/src/libudev/libudev-monitor.c
> @@ -24,7 +24,7 @@
>  #include <errno.h>
>  #include <string.h>
>  #include <dirent.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/stat.h>
>  #include <sys/socket.h>
>  #include <sys/un.h>
> diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
> index 822a803..7b3147e 100644
> --- a/src/readahead/readahead-collect.c
> +++ b/src/readahead/readahead-collect.c
> @@ -34,7 +34,7 @@
>  #include <unistd.h>
>  #include <linux/fanotify.h>
>  #include <sys/signalfd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/mman.h>
>  #include <linux/fs.h>
>  #include <linux/fiemap.h>
> diff --git a/src/reply-password/reply-password.c b/src/reply-password/reply-password.c
> index 73c2d1b..8aa2d55 100644
> --- a/src/reply-password/reply-password.c
> +++ b/src/reply-password/reply-password.c
> @@ -20,7 +20,7 @@
>  ***/
>
>  #include <sys/socket.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/types.h>
>  #include <assert.h>
>  #include <string.h>
> diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
> index 63d7845..138caf4 100644
> --- a/src/resolve/resolved-manager.c
> +++ b/src/resolve/resolved-manager.c
> @@ -23,7 +23,7 @@
>  #include <resolv.h>
>  #include <net/if.h>
>  #include <sys/ioctl.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <netinet/in.h>
>
>  #include "rtnl-util.h"
> diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
> index 8d03f4a..dab834d 100644
> --- a/src/shared/ask-password-api.c
> +++ b/src/shared/ask-password-api.c
> @@ -21,7 +21,7 @@
>  #include <stdbool.h>
>  #include <termios.h>
>  #include <unistd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/inotify.h>
>  #include <errno.h>
>  #include <fcntl.h>
> diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
> index 5a7bbaf..908c0a4 100644
> --- a/src/shared/logs-show.c
> +++ b/src/shared/logs-show.c
> @@ -22,7 +22,7 @@
>  #include <time.h>
>  #include <assert.h>
>  #include <errno.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/socket.h>
>  #include <string.h>
>  #include <fcntl.h>
> diff --git a/src/shared/spawn-polkit-agent.c b/src/shared/spawn-polkit-agent.c
> index 29b01db..3a2ca21 100644
> --- a/src/shared/spawn-polkit-agent.c
> +++ b/src/shared/spawn-polkit-agent.c
> @@ -27,7 +27,7 @@
>  #include <signal.h>
>  #include <fcntl.h>
>  #include <errno.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>
>  #include "log.h"
>  #include "util.h"
> diff --git a/src/shared/util.c b/src/shared/util.c
> index 30b0364..9157b2f 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -40,7 +40,7 @@
>  #include <termios.h>
>  #include <stdarg.h>
>  #include <sys/inotify.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <ctype.h>
>  #include <sys/prctl.h>
>  #include <sys/utsname.h>
> diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
> index 30a0c03..e0319f0 100644
> --- a/src/shared/utmp-wtmp.c
> +++ b/src/shared/utmp-wtmp.c
> @@ -26,7 +26,7 @@
>  #include <sys/utsname.h>
>  #include <fcntl.h>
>  #include <unistd.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>
>  #include "macro.h"
>  #include "path-util.h"
> diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c
> index 99aa4b3..fd64f12 100644
> --- a/src/shutdownd/shutdownd.c
> +++ b/src/shutdownd/shutdownd.c
> @@ -20,7 +20,7 @@
>  ***/
>
>  #include <sys/socket.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/types.h>
>  #include <sys/timerfd.h>
>  #include <assert.h>
> diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
> index 8a02fb0..84cc147 100644
> --- a/src/tty-ask-password-agent/tty-ask-password-agent.c
> +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
> @@ -25,7 +25,7 @@
>  #include <sys/socket.h>
>  #include <sys/un.h>
>  #include <stddef.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/inotify.h>
>  #include <unistd.h>
>  #include <getopt.h>
> diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
> index 6fb5bb4..26029b7 100644
> --- a/src/udev/udev-ctrl.c
> +++ b/src/udev/udev-ctrl.c
> @@ -16,7 +16,7 @@
>  #include <string.h>
>  #include <unistd.h>
>  #include <sys/types.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/socket.h>
>  #include <sys/un.h>
>
> diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
> index dc1f682..93c9c93 100644
> --- a/src/udev/udev-event.c
> +++ b/src/udev/udev-event.c
> @@ -26,7 +26,7 @@
>  #include <time.h>
>  #include <net/if.h>
>  #include <sys/prctl.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/epoll.h>
>  #include <sys/wait.h>
>  #include <sys/signalfd.h>
> diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
> index ddcf1dd..0a8f535 100644
> --- a/src/udev/udevadm-settle.c
> +++ b/src/udev/udevadm-settle.c
> @@ -28,7 +28,7 @@
>  #include <getopt.h>
>  #include <signal.h>
>  #include <time.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/stat.h>
>  #include <sys/types.h>
>
> diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c
> index a300e1e..f25608c 100644
> --- a/src/udev/udevadm-test-builtin.c
> +++ b/src/udev/udevadm-test-builtin.c
> @@ -27,7 +27,7 @@
>  #include <signal.h>
>  #include <time.h>
>  #include <sys/inotify.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/stat.h>
>  #include <sys/types.h>
>
> diff --git a/src/udev/udevd.c b/src/udev/udevd.c
> index cd51793..071e963 100644
> --- a/src/udev/udevd.c
> +++ b/src/udev/udevd.c
> @@ -39,7 +39,7 @@
>  #include <sys/signalfd.h>
>  #include <sys/epoll.h>
>  #include <sys/mount.h>
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <sys/wait.h>
>  #include <sys/stat.h>
>  #include <sys/ioctl.h>
> --
> 2.1.0
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list