File 8cb9d249-autoptr-file-callback.patch of Package libvirt.22291

commit 8cb9d2495c0c2921bb7c9fc3059ed268790123b6
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Wed Apr 1 01:01:27 2020 +0200

    util: Define g_autoptr callback for FILE
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
    Reviewed-by: Ján Tomko <jtomko@redhat.com>

Index: libvirt-6.0.0/src/util/virfile.h
===================================================================
--- libvirt-6.0.0.orig/src/util/virfile.h
+++ libvirt-6.0.0/src/util/virfile.h
@@ -89,6 +89,7 @@ static inline void virForceCloseHelper(i
  */
 #define VIR_AUTOCLOSE __attribute__((cleanup(virForceCloseHelper))) int
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, fclose);
 
 /* Opaque type for managing a wrapper around a fd.  */
 struct _virFileWrapperFd;
openSUSE Build Service is sponsored by