Eric: Yifan Gu has posted a few patches for mingw support. My comments below. https://github.com/gyf304/nbdkit/commit/a37c4ca6546dfc4e96e305af97b62e5a9d61... * I think the SHARED_LDFLAGS idea is good. I pushed a slightly different take on the idea here: https://github.com/libguestfs/nbdkit/commit/1d634009ab8e43592065ec469df63124... It's slightly different from what Yifan posted above, because I replaced -module -avoid-version -shared with $(SHARED_LDFLAGS), adding -no-undefined additionally on mingw. * Change to .gitignore is obviously fine, but I kept the file sorted: https://github.com/libguestfs/nbdkit/commit/002da4f4ca279a798fea1bf8749558d6... * Defining -D_spawnv=spawnv seems OK, but should be a separate patch. I didn't push anything. * Unclear why AM_CONDITIONAL(MINGW) is needed. It doesn't seem to be used anywhere unless I'm missing something. However if conditional compilation for mingw is needed for something, then this would be fine. * Unclear why it's necessary to rename nbdkit-common.h -> nbdkit-compat.h ? While this isn't API, it seems we should not rename it unless there's a good reason. * Functions are indirected through struct nbdkit_functions _nbdkit_functions which I guess is necessary because of PE linking (we've had similar problems with PE linking restrictions in other programs). However I wasn't very clear how this actually works, and we cannot break existing Linux binaries, so this needs more thought and must be conditional on Windows only. https://github.com/gyf304/nbdkit/commit/4f238c3e52a70b855dbb5f3eb3084d357b7c... * This one should be folded into the eventual nbdkit_functions patch. https://github.com/gyf304/nbdkit/commit/20d888fbb8ccf33f0975a070df0d8e3d929b... * Is there no way to get the socket peer on Windows? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org