diff options
author | tron <tron@pkgsrc.org> | 2010-09-26 23:15:18 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2010-09-26 23:15:18 +0000 |
commit | f5166d674c11089ce96c0835f4b9e3a8b1b96744 (patch) | |
tree | 5e87f7ef3bdfeca80dc941bd7111796c9f451e27 /net/wireshark | |
parent | fd1020701516551d457e074c556c5fb2191fb8d3 (diff) | |
download | pkgsrc-f5166d674c11089ce96c0835f4b9e3a8b1b96744.tar.gz |
Fix build under NetBSD-current by avoiding a conflict between's popcount(3)
and locally defined functions of the same name.
Patch supplied by Sverre Froyen in private e-mail.
Diffstat (limited to 'net/wireshark')
-rw-r--r-- | net/wireshark/distinfo | 5 | ||||
-rw-r--r-- | net/wireshark/patches/patch-ba | 15 | ||||
-rw-r--r-- | net/wireshark/patches/patch-bb | 142 | ||||
-rw-r--r-- | net/wireshark/patches/patch-bc | 15 |
4 files changed, 176 insertions, 1 deletions
diff --git a/net/wireshark/distinfo b/net/wireshark/distinfo index fa3676c3b0d..a13140b7d53 100644 --- a/net/wireshark/distinfo +++ b/net/wireshark/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.34 2010/09/25 11:19:10 tron Exp $ +$NetBSD: distinfo,v 1.35 2010/09/26 23:15:18 tron Exp $ SHA1 (wireshark-1.4.0.tar.bz2) = a1dc5fa6eff0320da5dad7ec9c8f3a8f5a18be81 RMD160 (wireshark-1.4.0.tar.bz2) = 8eb683e1a1175a0386fc5f1262f0289af177d17c @@ -8,3 +8,6 @@ SHA1 (patch-ab) = 5ae79916603f04c2d362c764d39f0c99728e716c SHA1 (patch-ac) = 4e985520ea4b118aea6fc001f256b5de96de7840 SHA1 (patch-ad) = a09b5ac9e836ef01fbd6ba103de00d08c0af2800 SHA1 (patch-ae) = a741c3d126c0cd2496438c1c1540ccdfa10714c8 +SHA1 (patch-ba) = 49825d82605a665f54a5cdb6ccb364e55c0e0ffa +SHA1 (patch-bb) = 1e16337d1894f196f61b233423d729246dea33b5 +SHA1 (patch-bc) = 052ede4ba58502117fe7b355e22a906ff65b773e diff --git a/net/wireshark/patches/patch-ba b/net/wireshark/patches/patch-ba new file mode 100644 index 00000000000..1471f0ca5f3 --- /dev/null +++ b/net/wireshark/patches/patch-ba @@ -0,0 +1,15 @@ +$NetBSD: patch-ba,v 1.1 2010/09/26 23:15:18 tron Exp $ + +Avoid conflict with NetBSD's popcount(3). + +--- epan/dissectors/packet-x11.c.orig 2010-08-29 23:17:16.000000000 +0100 ++++ epan/dissectors/packet-x11.c 2010-09-26 23:55:27.000000000 +0100 +@@ -3044,7 +3044,7 @@ + g_hash_table_insert(reply_table, (gpointer)name, (gpointer)reply_info); + } + +-static int popcount(unsigned int mask) ++static int my_popcount(unsigned int mask) + { + #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) + /* GCC 3.4 or newer */ diff --git a/net/wireshark/patches/patch-bb b/net/wireshark/patches/patch-bb new file mode 100644 index 00000000000..6ff63150ab1 --- /dev/null +++ b/net/wireshark/patches/patch-bb @@ -0,0 +1,142 @@ +$NetBSD: patch-bb,v 1.1 2010/09/26 23:15:18 tron Exp $ + +Avoid conflict with NetBSD's popcount(3). + +--- epan/dissectors/x11-extension-implementation.h.orig 2010-08-29 23:17:00.000000000 +0100 ++++ epan/dissectors/x11-extension-implementation.h 2010-09-26 23:55:27.000000000 +0100 +@@ -20648,8 +20648,8 @@ + int f_namesPresent; + f_namesPresent = VALUE32(tvb, *offsetp + size + 4); + f_mapsPresent = VALUE32(tvb, *offsetp + size + 8); +- size += popcount(f_namesPresent) * 4; +- size += popcount(f_mapsPresent) * 12; ++ size += my_popcount(f_namesPresent) * 4; ++ size += my_popcount(f_mapsPresent) * 12; + return size + 20; + } + +@@ -20682,8 +20682,8 @@ + f_state = VALUE32(tvb, *offsetp); + proto_tree_add_item(t, hf_x11_struct_DeviceLedInfo_state, tvb, *offsetp, 4, little_endian); + *offsetp += 4; +- listOfCard32(tvb, offsetp, t, hf_x11_struct_DeviceLedInfo_names, hf_x11_struct_DeviceLedInfo_names_item, popcount(f_namesPresent), little_endian); +- struct_IndicatorMap(tvb, offsetp, t, little_endian, popcount(f_mapsPresent)); ++ listOfCard32(tvb, offsetp, t, hf_x11_struct_DeviceLedInfo_names, hf_x11_struct_DeviceLedInfo_names_item, my_popcount(f_namesPresent), little_endian); ++ struct_IndicatorMap(tvb, offsetp, t, little_endian, my_popcount(f_mapsPresent)); + } + } + +@@ -22981,7 +22981,7 @@ + *offsetp += 2; + UNUSED(16); + listOfByte(tvb, offsetp, t, hf_x11_xkb_GetCompatMap_reply_si_rtrn, (16 * f_nSIRtrn), little_endian); +- struct_ModDef(tvb, offsetp, t, little_endian, popcount(f_groupsRtrn)); ++ struct_ModDef(tvb, offsetp, t, little_endian, my_popcount(f_groupsRtrn)); + } + + static void xkbSetCompatMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) +@@ -23021,8 +23021,8 @@ + UNUSED(2); + listOfByte(tvb, offsetp, t, hf_x11_xkb_SetCompatMap_si, (16 * f_nSI), little_endian); + length -= (16 * f_nSI) * 1; +- struct_ModDef(tvb, offsetp, t, little_endian, popcount(f_groups)); +- length -= popcount(f_groups) * 4; ++ struct_ModDef(tvb, offsetp, t, little_endian, my_popcount(f_groups)); ++ length -= my_popcount(f_groups) * 4; + } + + static void xkbGetIndicatorState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) +@@ -23117,8 +23117,8 @@ + f_which = VALUE32(tvb, *offsetp); + proto_tree_add_item(t, hf_x11_xkb_SetIndicatorMap_which, tvb, *offsetp, 4, little_endian); + *offsetp += 4; +- struct_IndicatorMap(tvb, offsetp, t, little_endian, popcount(f_which)); +- length -= popcount(f_which) * 12; ++ struct_IndicatorMap(tvb, offsetp, t, little_endian, my_popcount(f_which)); ++ length -= my_popcount(f_which) * 12; + } + + static void xkbGetNamedIndicator(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) +@@ -23615,13 +23615,13 @@ + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames_item, (length - 56) / 4, little_endian); + } + if ((f_which & (1 << 8)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames_item, popcount(f_indicators), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames_item, my_popcount(f_indicators), little_endian); + } + if ((f_which & (1 << 11)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames_item, my_popcount(f_virtualMods), little_endian); + } + if ((f_which & (1 << 12)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_GroupNames_groups, hf_x11_xkb_GetNames_reply_GroupNames_groups_item, popcount(f_groupNames), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_GroupNames_groups, hf_x11_xkb_GetNames_reply_GroupNames_groups_item, my_popcount(f_groupNames), little_endian); + } + if ((f_which & (1 << 9)) != 0) { + struct_KeyName(tvb, offsetp, t, little_endian, f_nKeys); +@@ -23783,16 +23783,16 @@ + length -= (length - 52) / 4 * 4; + } + if ((f_which & (1 << 8)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames_item, popcount(f_indicators), little_endian); +- length -= popcount(f_indicators) * 4; ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames_item, my_popcount(f_indicators), little_endian); ++ length -= my_popcount(f_indicators) * 4; + } + if ((f_which & (1 << 11)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), little_endian); +- length -= popcount(f_virtualMods) * 4; ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames_item, my_popcount(f_virtualMods), little_endian); ++ length -= my_popcount(f_virtualMods) * 4; + } + if ((f_which & (1 << 12)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_GroupNames_groups, hf_x11_xkb_SetNames_GroupNames_groups_item, popcount(f_groupNames), little_endian); +- length -= popcount(f_groupNames) * 4; ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_GroupNames_groups, hf_x11_xkb_SetNames_GroupNames_groups_item, my_popcount(f_groupNames), little_endian); ++ length -= my_popcount(f_groupNames) * 4; + } + if ((f_which & (1 << 9)) != 0) { + struct_KeyName(tvb, offsetp, t, little_endian, f_nKeys); +@@ -24569,7 +24569,7 @@ + *offsetp += 2; + UNUSED(16); + listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_CompatMap_si_rtrn, (16 * f_nSIRtrn), little_endian); +- struct_ModDef(tvb, offsetp, t, little_endian, popcount(f_groupsRtrn)); ++ struct_ModDef(tvb, offsetp, t, little_endian, my_popcount(f_groupsRtrn)); + } + if ((f_reported & (1 << 2)) != 0) { + int f_clientDeviceID; +@@ -25032,13 +25032,13 @@ + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames_item, (length - 230) / 4, little_endian); + } + if ((f_which & (1 << 8)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames_item, popcount(f_indicators), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames_item, my_popcount(f_indicators), little_endian); + } + if ((f_which & (1 << 11)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames_item, my_popcount(f_virtualMods), little_endian); + } + if ((f_which & (1 << 12)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups_item, popcount(f_groupNames), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups_item, my_popcount(f_groupNames), little_endian); + } + if ((f_which & (1 << 9)) != 0) { + struct_KeyName(tvb, offsetp, t, little_endian, f_nKeys); +@@ -25191,13 +25191,13 @@ + listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_KTLevelNames_ktLevelNames, hf_x11_xkb_GetKbdByName_reply_OtherNames_KTLevelNames_ktLevelNames_item, (length - 279) / 4, little_endian); + } + if ((f_which & (1 << 8)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_OtherNames_IndicatorNames_indicatorNames_item, popcount(f_indicators), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_OtherNames_IndicatorNames_indicatorNames_item, my_popcount(f_indicators), little_endian); + } + if ((f_which & (1 << 11)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_OtherNames_VirtualModNames_virtualModNames_item, popcount(f_virtualMods), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_OtherNames_VirtualModNames_virtualModNames_item, my_popcount(f_virtualMods), little_endian); + } + if ((f_which & (1 << 12)) != 0) { +- listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_OtherNames_GroupNames_groups_item, popcount(f_groupNames), little_endian); ++ listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_OtherNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_OtherNames_GroupNames_groups_item, my_popcount(f_groupNames), little_endian); + } + if ((f_which & (1 << 9)) != 0) { + struct_KeyName(tvb, offsetp, t, little_endian, f_nKeys); diff --git a/net/wireshark/patches/patch-bc b/net/wireshark/patches/patch-bc new file mode 100644 index 00000000000..a9457ec553b --- /dev/null +++ b/net/wireshark/patches/patch-bc @@ -0,0 +1,15 @@ +$NetBSD: patch-bc,v 1.1 2010/09/26 23:15:18 tron Exp $ + +Avoid conflict with NetBSD's popcount(3). + +--- tools/process-x11-xcb.pl.orig 2010-08-29 23:15:01.000000000 +0100 ++++ tools/process-x11-xcb.pl 2010-09-26 23:55:27.000000000 +0100 +@@ -436,7 +436,7 @@ + return '(' . $op->att('op') . "$left)"; + } + when ('popcount') { +- return "popcount($left)"; ++ return "my_popcount($left)"; + } + default { die "Invalid unop element $op->name()\n"; } + } |