Skip to content

Commit

Permalink
tls: Include <poll.h> instead of <sys/poll.h>
Browse files Browse the repository at this point in the history
musl libc warns about these:
```
In file included from src/tls/socket-io.c:32:
/usr/x86_64-pc-linux-musl/include/sys/poll.h:1:2: warning: redirecting incorrect #include <sys/poll.h> to <poll.h> [-W#warnings]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^
  CC       src/pam-ssh-add/pam_ssh_add_so-pam-ssh-add.o
In file included from src/tls/connection.c:37:
/usr/x86_64-pc-linux-musl/include/sys/poll.h:1:2: warning: redirecting incorrect #include <sys/poll.h> to <poll.h> [-W#warnings]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^
```
and glibc's `<sys/poll.h>` also just wraps `<poll.h>`. Use `<poll.h>` to get
rid of the warning on musl based systems
  • Loading branch information
marv authored and martinpitt committed Oct 23, 2023
1 parent 330545d commit 54a27a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tls/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include <fcntl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <poll.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/timerfd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/tls/socket-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/un.h>

Expand Down

0 comments on commit 54a27a6

Please sign in to comment.