Work around Fedora-specific patch to libselinux causing warnings
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 5 Nov 2012 14:00:39 +0000 (16:00 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 5 Nov 2012 14:04:41 +0000 (16:04 +0200)
- In recent Fedora, struct selinux_opt value member is changed to an
  anonymous union of char * and char **. Initialize the members by name
  to avoid warnings in both (patched and unpatched) cases.

lib/rpmts.c

index a34edf9..b505371 100644 (file)
@@ -760,7 +760,7 @@ rpmRC rpmtsSELabelInit(rpmts ts, int open_status)
     }
 
     struct selinux_opt opts[] = {
-       {SELABEL_OPT_PATH, path}
+       { .type = SELABEL_OPT_PATH, .value = path}
     };
 
     if (ts->selabelHandle) {