The rebased version is at  https://github.com/gyf304/nbdkit/commits/msys2-port
It is currently buildable with:
autoreconf -i && ./configure host=x86_64-pc-msys && make -j

A few changes are added:
* nbdkit_peer_name is added back but will always error.
* __declspec(dllexport) is added to the headers for PE compatibility.
* -D_spawnv=spawnv is now removed.
  I think I didn't run ./configure properly last time.

Here is the list of features that are tested to compile.

Optional server features:

    bash-completion ........................ yes
    manual pages ........................... yes
    SELinux ................................ no
    TLS .................................... no

Optional plugins:

    curl ................................... no
    example4 ............................... yes
    ext2 ................................... no
    floppy ................................. no
    guestfs ................................ no
    gzip ................................... no
    iso .................................... no
    libvirt ................................ no
    nbd .................................... no
    ssh .................................... no
    tar .................................... yes
    vddk ................................... yes

Languages:

    lua .................................... no
    ocaml .................................. no
    perl ................................... yes
    python ................................. yes
    ruby ................................... no
    rust ................................... no
    tcl .................................... no

Optional filters:

    ext2 ................................... no
    xz ..................................... no



On Sun, Mar 22, 2020 at 10:28 AM Richard W.M. Jones <rjones@redhat.com> wrote:
On Sat, Mar 21, 2020 at 09:36:15PM -0400, Frank Gu wrote:
> Answering a few questions:
>
> * Unclear why it's necessary to rename nbdkit-common.h -> nbdkit-compat.h
> - It's not a rename, but a new file. nbdkit-compat.h is included for PE DLL
>   compatibility, and is included in nbdkit-common.h

Oh I see.  The github UI is super-confusing and made it look as if the
file had been renamed.

Is it possible at some point that you could rebase your work on top of
the current head, and split it into individually reviewable patches?

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW