File werror-fixes.patch of Package ldmtool

--- a/src/ldmtool.c
+++ b/src/ldmtool.c
@@ -87,7 +87,7 @@ typedef struct {
     const _action_t action;
 } _command_t;
 
-static const _command_t const commands[] = {
+static const _command_t commands[] = {
     { "scan", ldm_scan },
     { "show", ldm_show },
     { "create", ldm_create },
@@ -777,9 +777,11 @@ main(int argc, char *argv[])
     }
     g_option_context_free(context);
 
+#if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION <= 35 && GLIB_MICRO_VERSION <= 0)
     g_type_init();
+#endif
 
-    LDM * const ldm = ldm_new(&err);
+    LDM * const ldm = ldm_new();
 
     int ret = 0;
 
--- a/src/ldm.c
+++ b/src/ldm.c
@@ -31,6 +31,7 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <unistd.h>
 #include <uuid/uuid.h>
openSUSE Build Service is sponsored by