$OpenBSD: patch-libpeas_peas-object-module_c,v 1.3 2014/11/12 10:47:12 jasper Exp $

Add error messages on OpenBSD to test log hooks
https://bugzilla.gnome.org/show_bug.cgi?id=727380

--- libpeas/peas-object-module.c.orig	Mon Sep 22 15:52:53 2014
+++ libpeas/peas-object-module.c	Wed Nov 12 10:22:28 2014
@@ -100,27 +100,31 @@ peas_object_module_load (GTypeModule *gmodule)
 
   if (module->priv->library == NULL)
     {
-      g_warning ("%s: %s", module->priv->module_name, g_module_error ());
+      g_warning ("Failed to load module '%s': %s",
+                 module->priv->module_name, g_module_error ());
 
       return FALSE;
     }
 
-  /* extract symbols from the lib */
+  /* Extract the required symbol from the library */
   if (!g_module_symbol (module->priv->library,
                         "peas_register_types",
-                        (void *) &module->priv->register_func))
+                        (gpointer) &module->priv->register_func))
     {
-      g_warning ("%s: %s", module->priv->module_name, g_module_error ());
+      g_warning ("Failed to get 'peas_register_types' for module '%s': %s",
+                 module->priv->module_name, g_module_error ());
       g_module_close (module->priv->library);
 
       return FALSE;
     }
 
-  /* symbol can still be NULL even though g_module_symbol
-   * returned TRUE */
+
+  /* The symbol can still be NULL even
+   * though g_module_symbol() returned TRUE
+   */
   if (module->priv->register_func == NULL)
     {
-      g_warning ("%s: Symbol 'peas_register_types' is not defined",
+      g_warning ("Invalid 'peas_register_types' in module '%s'",
                  module->priv->module_name);
       g_module_close (module->priv->library);
 
