diff --git a/.github/workflows/cygwin-build.yaml b/.github/workflows/cygwin-build.yaml new file mode 100644 index 00000000..c012b5fd --- /dev/null +++ b/.github/workflows/cygwin-build.yaml @@ -0,0 +1,31 @@ +name: Cygwin Build +on: + workflow_dispatch: +jobs: + build: + runs-on: windows-latest + env: + SHELLOPTS: igncr + defaults: + run: + shell: C:/tools/cygwin/bin/bash.exe --login '{0}' + steps: + - uses: egor-tensin/setup-cygwin@v4 + with: + install-dir: C:/tools/cygwin + packages: gcc-core gcc-g++ autoconf automake libtool pkg-config make zlib-devel libcrypt-devel libtommath-devel cygwin-devel + - run: git config --global core.autocrlf false + - run: git config --system core.eol lf + - uses: actions/checkout@v2 + - run: cd $GITHUB_WORKSPACE; autoreconf --verbose --force + - run: cd $GITHUB_WORKSPACE; ./configure + - run: cd $GITHUB_WORKSPACE; make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" + - uses: actions/upload-artifact@v2 + with: + name: dropbear + path: | + ${{ github.workspace }}/dropbear.exe + ${{ github.workspace }}/dbclient.exe + ${{ github.workspace }}/dropbearkey.exe + ${{ github.workspace }}/dropbearconvert.exe + ${{ github.workspace }}/scp.exe diff --git a/src/sysoptions.h b/src/sysoptions.h index 82249f52..aa94f178 100644 --- a/src/sysoptions.h +++ b/src/sysoptions.h @@ -3,6 +3,13 @@ * This file is only included from options.h *******************************************************************/ +/* TODO: find a better workaround */ +#ifdef __CYGWIN__ +#ifndef HAVE_SYS_RANDOM_H +#define HAVE_SYS_RANDOM_H 1 +#endif +#endif + #ifndef DROPBEAR_VERSION #define DROPBEAR_VERSION "2022.83" #endif