Browse Source

Merge pull request #1534 from weidi/master

Merge pull request #1534: Fix build error on alpine
Ilya Shipitsin 3 years ago
parent
commit
034aae5a70
3 changed files with 29 additions and 1 deletions
  1. 23 0
      .github/workflows/musl.yml
  2. 1 1
      src/Cedar/BridgeUnix.c
  3. 5 0
      src/Mayaqua/Network.h

+ 23 - 0
.github/workflows/musl.yml

@@ -0,0 +1,23 @@
+name: alpine/musl
+
+on: [push, pull_request]
+
+permissions:
+  contents: read
+
+jobs:
+  musl:
+      name: gcc
+      runs-on: ubuntu-latest
+      container:
+        image: alpine:latest
+      steps:
+      - uses: actions/checkout@v1
+        with:
+          submodules: true
+      - name: Install dependencies
+        run: apk add binutils --no-cache build-base readline-dev openssl-dev ncurses-dev git cmake zlib-dev libsodium-dev gnu-libiconv 
+      - name: Configure
+        run: ./configure
+      - name: make 
+        run: make -C build

+ 1 - 1
src/Cedar/BridgeUnix.c

@@ -49,7 +49,7 @@
 #endif
 
 #ifdef UNIX_LINUX
-#include <linux/if_packet.h>
+#include <netpacket/packet.h>
 
 struct my_tpacket_auxdata
 {

+ 5 - 0
src/Mayaqua/Network.h

@@ -14,11 +14,16 @@
 #ifdef OS_UNIX
 #include <netinet/in.h>
 
+#ifdef UNIX_LINUX
+#include <pthread.h>
+#endif
+
 #ifdef UNIX_OPENBSD
 #include <pthread.h>
 #endif
 #endif
 
+
 // Dynamic Value
 struct DYN_VALUE
 {