Skip to content

Commit

Permalink
devel/rubygem-glib2: unbreak with glib 2.76
Browse files Browse the repository at this point in the history
rbglib_bookmarkfile.c:39:1: error: static declaration of 'g_bookmark_file_get_type' follows non-static declaration
g_bookmark_file_get_type(void)
^
/usr/local/include/glib-2.0/gobject/glib-types.h:402:9: note: previous declaration is here
GType   g_bookmark_file_get_type   (void) G_GNUC_CONST;
        ^
rbglib_bookmarkfile.c:50:9: warning: 'G_TYPE_BOOKMARK_FILE' macro redefined [-Wmacro-redefined]
 #define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type())
         ^
/usr/local/include/glib-2.0/gobject/glib-types.h:337:9: note: previous definition is here
 #define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type ())
         ^

PR:		270087
Reported by:	antoine (via exp-run)
  • Loading branch information
jbeich committed Mar 16, 2023
1 parent 4482d8e commit 9a23b33
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions devel/rubygem-glib2/files/patch-ext_glib2_rbglib__bookmarkfile.c
@@ -0,0 +1,18 @@
--- ext/glib2/rbglib_bookmarkfile.c.orig 2023-03-16 13:19:47 UTC
+++ ext/glib2/rbglib_bookmarkfile.c
@@ -35,6 +35,7 @@ bookmarkfile_copy(const GBookmarkFile* file)
return (GBookmarkFile*)file;
}

+#if !GLIB_CHECK_VERSION(2, 76, 0)
static GType
g_bookmark_file_get_type(void)
{
@@ -48,6 +49,7 @@ g_bookmark_file_get_type(void)
/************************************************/

#define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type())
+#endif

#define RG_TARGET_NAMESPACE cBookmarkFile
#define _SELF(self) ((GBookmarkFile*)(RVAL2BOXED(self, G_TYPE_BOOKMARK_FILE)))

0 comments on commit 9a23b33

Please sign in to comment.