Silence compiler warnings such as: ../../../common/replacements/fsync.c: In function 'fsync': ../../../common/replacements/fsync.c:58:5: warning: implicit declaration of function 'nbdkit_debug' [-Wimplicit-function-declaration] 58 | nbdkit_debug ("ReadFile: bad handle"); | ^~~~~~~~~~~~ --- common/replacements/Makefile.am | 7 ++++++- common/replacements/fsync.c | 3 ++- common/replacements/pread.c | 3 ++- common/replacements/pwrite.c | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/common/replacements/Makefile.am b/common/replacements/Makefile.am index da0f8fec..9ad59148 100644 --- a/common/replacements/Makefile.am +++ b/common/replacements/Makefile.am @@ -1,5 +1,5 @@ # nbdkit -# Copyright (C) 2019 Red Hat Inc. +# Copyright (C) 2019-2022 Red Hat Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -33,6 +33,11 @@ include $(top_srcdir)/common-rules.mk SUBDIRS = win32 +AM_CPPFLAGS = \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + $(NULL) + noinst_LTLIBRARIES = libcompat.la # sources should be empty libcompat_la_SOURCES = diff --git a/common/replacements/fsync.c b/common/replacements/fsync.c index a7f3bf27..0224a957 100644 --- a/common/replacements/fsync.c +++ b/common/replacements/fsync.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2019-2020 Red Hat Inc. + * Copyright (C) 2019-2022 Red Hat Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -46,6 +46,7 @@ /* Replacement fsync for Win32. */ +#include "nbdkit-plugin.h" #include <windows.h> int diff --git a/common/replacements/pread.c b/common/replacements/pread.c index ab690071..28a6aacc 100644 --- a/common/replacements/pread.c +++ b/common/replacements/pread.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2019-2020 Red Hat Inc. + * Copyright (C) 2019-2022 Red Hat Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -47,6 +47,7 @@ /* Replacement pread for Win32. */ +#include "nbdkit-plugin.h" #include <windows.h> ssize_t diff --git a/common/replacements/pwrite.c b/common/replacements/pwrite.c index 71e56ad1..54d40fe1 100644 --- a/common/replacements/pwrite.c +++ b/common/replacements/pwrite.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2019-2020 Red Hat Inc. + * Copyright (C) 2019-2022 Red Hat Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -47,6 +47,7 @@ /* Replacement pwrite for Win32. */ +#include "nbdkit-plugin.h" #include <windows.h> ssize_t -- 2.37.3 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs