search for: virsocket

Displaying 4 results from an estimated 4 matches for "virsocket".

Did you mean: libsocket
2020 Aug 17
2
Re: [nbdkit] Windows errno handling
...done. We follow a simplified version > of what GNULIB does, by defining custom wrapper functions around > all winsock APIs we need that set errno, and then use a macro to > transparently replace calls to use our wrappers: > > https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.h > https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.c > > You should be able to just lift those two files straight into your > git repo as they have no deps on other libvirt infra. Except that libvirt is GPLv2+, and nbdkit is not, so we'd need to relicense (if...
2020 Aug 17
3
[nbdkit] Windows errno handling
The Windows port of nbdkit (https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw) now works to some extent. However errno handling doesn't work. The way that Winsock handles errors is incompatible with the way we expect to work errno in several ways. The long story is here: https://docs.microsoft.com/en-us/windows/win32/winsock/error-codes-errno-h-errno-and-wsagetlasterror-2
2020 Aug 17
0
Re: [nbdkit] Windows errno handling
...ied version > > of what GNULIB does, by defining custom wrapper functions around > > all winsock APIs we need that set errno, and then use a macro to > > transparently replace calls to use our wrappers: > > > > https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.h > > https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.c > > > > You should be able to just lift those two files straight into your > > git repo as they have no deps on other libvirt infra. > > Except that libvirt is GPLv2+, and nbdkit is not, so w...
2020 Aug 17
0
Re: [nbdkit] Windows errno handling
...look at what libvirt has done. We follow a simplified version of what GNULIB does, by defining custom wrapper functions around all winsock APIs we need that set errno, and then use a macro to transparently replace calls to use our wrappers: https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.h https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virsocket.c You should be able to just lift those two files straight into your git repo as they have no deps on other libvirt infra. QEMU follows a similar kind of approach too, but its impl is harder to lift out. Note, we never use %m...