Displaying 5 results from an estimated 5 matches for "windows_compat".
2020 Mar 23
6
[PATCH nbdkit 0/3] msys2 support for review
I pushed a few of the msys2 patches upstream. I changed the way that
$(SHARED_LDFLAGS) works so it's more to my liking, and the others were
pushed unchanged. Three patches remain which I'm posting on the
mailing list for proper review.
Rich.
2020 Mar 23
0
[PATCH nbdkit 1/3] include: Function indirection for PE DLL
...include/nbdkit-common.h
+++ b/include/nbdkit-common.h
@@ -40,10 +40,14 @@
#include <stdarg.h>
#include <stdint.h>
#include <errno.h>
-#include <sys/socket.h>
+#include <nbdkit-compat.h>
#include <nbdkit-version.h>
+#if defined(NBDKIT_INTERNAL) || !defined(WINDOWS_COMPAT)
+#include <sys/socket.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -76,6 +80,7 @@ extern "C" {
#define NBDKIT_EXTENT_HOLE (1<<0) /* Same as NBD_STATE_HOLE */
#define NBDKIT_EXTENT_ZERO (1<<1) /* Same as NBD_STATE_ZERO */
+#if defined(NBD...
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
...ters, and one plugin. */
struct backend *top;
+struct nbdkit_functions *functions = NULL;
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
@@ -152,6 +153,49 @@ dump_config (void)
printf ("%s=%d\n", "version_minor", NBDKIT_VERSION_MINOR);
}
+#ifdef WINDOWS_COMPAT
+static int dummy_peer_name (void *addr, void *addrlen)
+{
+ nbdkit_error ("nbdkit_peer_name not implemented on this platform");
+ return -1;
+}
+
+static void init_functions ()
+{
+ functions = malloc (sizeof *functions);
+ if (functions == NULL) {
+ perror ("malloc");
+...
2020 Mar 24
3
Re: nbdkit / mingw support
On Tue, Mar 24, 2020 at 02:16:32PM -0500, Eric Blake wrote:
> On 3/24/20 1:54 PM, Richard W.M. Jones wrote:
> >On Tue, Mar 24, 2020 at 01:43:52PM -0500, Eric Blake wrote:
> >>On 3/21/20 7:06 AM, Richard W.M. Jones wrote:
> >>>Eric:
> >>>
> >>>Yifan Gu has posted a few patches for mingw support. My comments
> >>>below.
>
2020 Mar 24
2
Re: nbdkit / mingw support
...to compile
> against that library)?
I guess what I haven't said yet is that the existing proposed patches
from Frank for making mingw compile are NOT the right way to resolve the
need for -no-undefined on that platform. Instead of creating lots of
wrapper functions buried inside #ifdef WINDOWS_COMPAT, we really should
be focusing on creating a clean libnbdkit.so/dll library that exposes
all of the needed symbols without the need for preprocessor magic, and
therefore without API breaks.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu....