-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for Darwin / macOS #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4c10010
e920e7f
441de7a
eb8dc1e
837d25f
c9c891b
bf8283a
f6cd3bc
d04a15a
dd14a87
3bdae24
d2034e5
44b1998
e1c159c
19d1d3e
5da02fe
7e6dad8
c450118
8a67a9a
65a2602
bdf0823
6a590c6
ea815b0
f7ee065
f18a138
b346ca9
d10a94f
0853b1f
2824fd2
be6a688
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,11 +13,11 @@ jobs: | |
| ubuntu: | ||
| strategy: | ||
| matrix: | ||
| os: [ ubuntu-latest, ubuntu-22.04 ] | ||
| os: [ ubuntu-latest ] | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install Lua | ||
| run: | | ||
|
|
@@ -30,7 +30,29 @@ jobs: | |
| - name: Build | ||
| run: make | ||
|
|
||
| macos: | ||
| strategy: | ||
| matrix: | ||
| os: [ macos-15, macos-26 ] | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install Lua | ||
| run: | | ||
| brew install lua | ||
|
|
||
| - name: Configure | ||
| run: ./configure | ||
|
|
||
| - name: Build | ||
| run: make | ||
|
Comment on lines
+42
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lua plugin may silently fail to build — pkg-config configuration needed. The Consider adding the Homebrew pkg-config path: Proposed fix - name: Install Lua
run: |
brew install lua
+
+ - name: Configure
+ run: |
+ export PKG_CONFIG_PATH="$(brew --prefix lua)/lib/pkgconfig:$PKG_CONFIG_PATH"
+ ./configure
- - name: Configure
- run: ./configure
-
- name: Build
run: makeAlternatively, you could add a post-configure check that verifies grep -q 'LUA_PLUGIN' config.mk || { echo "Lua plugin not detected"; exit 1; }🤖 Prompt for AI Agents
Comment on lines
+33
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lua plugin may silently fail to build on macOS — pkg-config path still not configured. The Proposed fix to export Homebrew's pkg-config path - name: Install Lua
run: |
brew install lua
- name: Configure
- run: ./configure
+ run: |
+ export PKG_CONFIG_PATH="$(brew --prefix lua)/lib/pkgconfig:$PKG_CONFIG_PATH"
+ ./configure
- name: Build
run: makeOptionally, add a post-configure verification step: - name: Verify Lua plugin detected
run: grep -q 'LUA_PLUGIN' config.mk || { echo "Lua plugin not detected"; exit 1; }🤖 Prompt for AI Agents |
||
|
|
||
| # The BSDs are currently broken on github | ||
|
|
||
| openbsd: | ||
| if: false | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Bootstrap OpenBSD-latest | ||
|
|
@@ -50,6 +72,7 @@ jobs: | |
| make | ||
|
|
||
| freebsd: | ||
| if: false | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Bootstrap FreeBSD-latest | ||
|
|
@@ -69,6 +92,7 @@ jobs: | |
| make | ||
|
|
||
| netbsd: | ||
| if: false | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Bootstrap NetBSD-latest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,9 @@ config.mk | |
| config.h | ||
| config.log | ||
|
|
||
| *.dSYM/** | ||
| *.o | ||
| *.So | ||
| *.soo | ||
| *.so | ||
|
|
||
| *.tar.xz | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /* $NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $ */ | ||
|
|
||
| /*- | ||
| * Copyright (c) 2015 Joerg Sonnenberger <joerg@NetBSD.org>. | ||
| * All rights reserved. | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without | ||
| * modification, are permitted provided that the following conditions | ||
| * are met: | ||
| * | ||
| * 1. Redistributions of source code must retain the above copyright | ||
| * notice, this list of conditions and the following disclaimer. | ||
| * 2. Redistributions in binary form must reproduce the above copyright | ||
| * notice, this list of conditions and the following disclaimer in | ||
| * the documentation and/or other materials provided with the | ||
| * distribution. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||
| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
| * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| * SUCH DAMAGE. | ||
| */ | ||
|
|
||
| #include <errno.h> | ||
| #include <limits.h> | ||
| #include <stddef.h> | ||
| #include <stdint.h> | ||
| #include <stdlib.h> | ||
|
|
||
| /* | ||
| * To be clear, this is NetBSD's more refined reallocarr(3) function | ||
| * made to look like OpenBSD's more useable reallocarray(3) interface. | ||
| */ | ||
| #include "reallocarray.h" | ||
|
|
||
| #define SQRT_SIZE_MAX (((size_t)1) << (sizeof(size_t) * CHAR_BIT / 2)) | ||
| void * | ||
| reallocarray(void *ptr, size_t n, size_t size) | ||
| { | ||
| if (n == 0 || size == 0) | ||
| return realloc(ptr, 0); | ||
|
|
||
| /* | ||
| * Try to avoid division here. | ||
| * | ||
| * It isn't possible to overflow during multiplication if neither | ||
| * operand uses any of the most significant half of the bits. | ||
| */ | ||
| if ((n | size) >= SQRT_SIZE_MAX && n > SIZE_MAX / size) { | ||
| errno = ENOMEM; | ||
| return NULL; | ||
| } | ||
| return realloc(ptr, n * size); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* $NetBSD: reallocarr.c,v 1.4 2015/08/20 20:08:04 joerg Exp $ */ | ||
|
|
||
| /*- | ||
| * Copyright (c) 2015 Joerg Sonnenberger <joerg@NetBSD.org>. | ||
| * All rights reserved. | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without | ||
| * modification, are permitted provided that the following conditions | ||
| * are met: | ||
| * | ||
| * 1. Redistributions of source code must retain the above copyright | ||
| * notice, this list of conditions and the following disclaimer. | ||
| * 2. Redistributions in binary form must reproduce the above copyright | ||
| * notice, this list of conditions and the following disclaimer in | ||
| * the documentation and/or other materials provided with the | ||
| * distribution. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||
| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
| * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| * SUCH DAMAGE. | ||
| */ | ||
|
|
||
| #ifndef REALLOCARRAY_H | ||
| #define REALLOCARRAY_H | ||
|
|
||
| #include <stddef.h> | ||
|
|
||
| void *reallocarray(void *, size_t, size_t); | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| # This space left intentionally blank | ||
|
|
||
| DHCPCD_SRCS+= dhcpcd-embedded.c |
Uh oh!
There was an error while loading. Please reload this page.