Date: Sat, 27 Jan 2007 16:59:15 +0100 (CET) From: Stefan Richter Subject: firewire: fix compilation with gcc 3.4 drivers/firewire/fw-topology.c: In function `report_found_node': drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field Signed-off-by: Stefan Richter --- gcc 4.1.1 (Gentoo 4.1.1-r3) is fine with this. gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk) doesn't like it. Index: linux-2.6.20-rc6/drivers/firewire/fw-topology.c =================================================================== --- linux-2.6.20-rc6.orig/drivers/firewire/fw-topology.c 2007-01-27 16:29:11.000000000 +0100 +++ linux-2.6.20-rc6/drivers/firewire/fw-topology.c 2007-01-27 16:41:37.000000000 +0100 @@ -342,8 +342,9 @@ report_found_node(struct fw_card *card, int b_path = (node->phy_speed == SCODE_BETA); if (parent != NULL) { - node->max_speed = min((u8)parent->max_speed, - (u8)node->phy_speed); + /* min() macro doesn't work here with gcc 3.4 */ + node->max_speed = parent->max_speed < node->phy_speed ? + parent->max_speed : node->phy_speed; node->b_path = parent->b_path && b_path; } else { node->max_speed = node->phy_speed;