commit - d90a46c832867c5a2a6786ad0bdb2942cd5bb76d
commit + e49904066e82d73302ebd16eab6446a69a0ee49f
blob - /dev/null
blob + a20868a5ed0db36d789c2a500211b9f29c9f57a7 (mode 644)
--- /dev/null
+++ .github/workflows/build.yml
+name: Build with Cosmopolitan
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Download cosmocc
+ run: |
+ curl -LO https://cosmo.zip/pub/cosmocc/cosmocc.zip
+ unzip cosmocc.zip -d cosmocc
+ echo "$PWD/cosmocc/bin" >> $GITHUB_PATH
+
+ - name: Build project
+ run: |
+ cosmocc src/*.c -O3 -Iinclude -o bareiron.exe
+
+ - name: Upload release
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: latest
+ name: Latest build
+ files: bareiron.exe
+ overwrite: true
+ prerelease: true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
blob - c40d3d6db9b2c790bddb8573eeae0324bf419cb0
blob + 331f960a0ebc54dc84feb6b6c0857409d0e8f237
--- src/main.c
+++ src/main.c
#include "lwip/sockets.h"
#include "lwip/netdb.h"
#else
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <time.h>
blob - 3fc84b6fecb893cc8375263630e8a9abf2286365
blob + f23ba45d7ea67adcb18681c6de9402a158b0f0d9
--- src/tools.c
+++ src/tools.c
#include "lwip/netdb.h"
#include "esp_timer.h"
#else
+ #include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <time.h>