Skip to content

Commit dcb4956

Browse files
committed
Darwin: Add initial support for macOS
Apple route(4) has some limitations as does getifaddrs(3). Basically there is no means of being notified of carrier state because Apple only reports this via media state which is an ioctl. The good news is that we can build macOS on github so we can get some BSD traceability at least. Fixes #524
1 parent 162e68b commit dcb4956

14 files changed

Lines changed: 170 additions & 65 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,33 @@ env:
1010
CC: clang
1111

1212
jobs:
13+
# macos is a good plaform as we know it ships with a sanitier we can use
14+
macos:
15+
strategy:
16+
matrix:
17+
os: [ macos-15, macos-26 ]
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- name: Configure
24+
run: ./configure --sanitize
25+
26+
- name: Build
27+
run: make
28+
29+
- name: Tests
30+
run: make tests
31+
1332
ubuntu:
1433
strategy:
1534
matrix:
1635
os: [ ubuntu-latest, ubuntu-22.04 ]
1736
runs-on: ${{ matrix.os }}
1837

1938
steps:
20-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v6
2140

2241
- name: Configure
2342
run: ./configure

‎compat/crypt/sha256.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#ifdef __GLIBC__
3737
# include <endian.h>
3838
#endif
39-
#ifdef BSD
39+
#if defined(BSD) || defined(__APPLE__)
4040
# ifndef __QNX__
4141
# include <sys/endian.h>
4242
# endif

0 commit comments

Comments
 (0)