If compiling on 3.13, struct genl_family isn't actually
struct backport_genl_family, and then family->family
doesn't exist. In other cases, it's actually necessary
to update it, so add an #ifdef with the same logic as
the override from genl_family -> backport_genl_family.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
family->id = copy->family.id;
family->attrbuf = copy->family.attrbuf;
+#if LINUX_VERSION_IS_LESS(3,13,0) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0)
/* family ID from the original family struct will be used when building
* genl messages (sent as nlmsg_type), so the new id should be updated
* in the original (older kernel format) family struct too
*/
family->family.id = copy->family.id;
+#endif
#if LINUX_VERSION_IS_GEQ(3,13,0)
family->mcgrp_offset = copy->family.mcgrp_offset;