Commit 22b987b
authored
Make multicast-group helpers and vsock fallback portable to QNX (#20)
* Make multicast-group helpers and vsock fallback portable to QNX
Two small portability fixes so this builds on QNX (and stays building
on macOS / BSDs):
* UDPSocket::JoinMulticastGroup / LeaveMulticastGroup used the
Linux-only struct ip_mreqn (with imr_ifindex). Switch to the
POSIX-portable struct ip_mreq. Behaviour is unchanged on Linux:
the previous code passed imr_ifindex = 0, which is equivalent to
INADDR_ANY in ip_mreq.imr_interface.
* The fallback definition of struct sockaddr_vm in sockets.h had a
typo `_APPLE__` (single leading underscore). This is harmless on
Apple, where <sys/vsock.h> is used instead, but on a system that
actually hits the fallback (e.g. QNX) a true `__APPLE__` macro
would never have inserted svm_len. Fix the spelling.
Made-with: Cursor
* Fix bazel test //...1 parent 9ec3f8d commit 22b987b
5 files changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
803 | | - | |
804 | | - | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
805 | 809 | | |
806 | 810 | | |
807 | 811 | | |
| |||
815 | 819 | | |
816 | 820 | | |
817 | 821 | | |
818 | | - | |
819 | | - | |
820 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
821 | 825 | | |
822 | 826 | | |
823 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments