[packages/mysqlsniffer] Rel 6
arekm
arekm at pld-linux.org
Fri May 8 23:30:48 CEST 2026
commit ac54478ade4686a357ea08c6fa8064ea182bc8f7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri May 8 23:30:38 2026 +0200
Rel 6
mysqlsniffer-c23-extern.patch | 58 +++++++++++++++++++++++++++++++++++++++++++
mysqlsniffer.spec | 4 ++-
2 files changed, 61 insertions(+), 1 deletion(-)
---
diff --git a/mysqlsniffer.spec b/mysqlsniffer.spec
index 66854c8..47b7a6a 100644
--- a/mysqlsniffer.spec
+++ b/mysqlsniffer.spec
@@ -2,11 +2,12 @@ Summary: Dumps packets that are sent or received over a network interface
Summary(pl.UTF-8): Zrzucanie pakietów wysyłanych lub otrzymywanych po interfejsie sieciowym
Name: mysqlsniffer
Version: 1.2
-Release: 5
+Release: 6
License: GPL
Group: Applications/Networking
Source0: http://hackmysql.com/code/%{name}.tgz
# Source0-md5: 816575bfd06179192468a15dd3d26cdb
+Patch0: %{name}-c23-extern.patch
URL: http://hackmysql.com/mysqlsniffer
BuildRequires: libpcap-devel >= 2:0.8.3-6
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -23,6 +24,7 @@ ruch MySQL-a w sieci TCP/IP.
%prep
%setup -q -c
+%patch -P0 -p1
%build
%{__cc} %{rpmcflags} -Wall -fPIC -c *.c
diff --git a/mysqlsniffer-c23-extern.patch b/mysqlsniffer-c23-extern.patch
new file mode 100644
index 0000000..b4168df
--- /dev/null
+++ b/mysqlsniffer-c23-extern.patch
@@ -0,0 +1,58 @@
+--- a/misc.h 2006-08-18 16:37:02.000000000 +0200
++++ b/misc.h 2026-05-08 23:15:21.383169552 +0200
+@@ -5,7 +5,7 @@
+ #define MATCH(a, b) (a == b ? 1 : 0)
+
+ typedef unsigned long long ulonglong; // 8 bytes
+-ulonglong decoded_len; // Set by decode_len()
++extern ulonglong decoded_len; // Set by decode_len()
+
+ void dump_pkt(u_char *pkt, u_int len, char only_hex);
+ const u_char *get_arg(u_char *pkt, u_int len);
+--- a/mysqlsniffer.h 2006-08-18 16:37:02.000000000 +0200
++++ b/mysqlsniffer.h 2026-05-08 23:15:26.333169551 +0200
+@@ -19,7 +19,7 @@ struct st_options {
+ v40:1;
+ u_short port_n;
+ };
+-struct st_options op; // Command line options
++extern struct st_options op; // Command line options
+
+ struct st_field_types {
+ u_char field_type[MAX_FIELD_TYPES];
+@@ -43,7 +43,7 @@ struct st_tag_id {
+ };
+ typedef struct st_tag_id tag_id;
+
+-tag_id tags[MAX_TAGS];
+-tag_id *tag; // Information about the current connection
++extern tag_id tags[MAX_TAGS];
++extern tag_id *tag; // Information about the current connection
+
+ void remove_tag(tag_id *tag);
+--- a/state_map.h 2006-08-18 16:37:02.000000000 +0200
++++ b/state_map.h 2026-05-08 23:15:29.336502884 +0200
+@@ -11,7 +11,7 @@ struct st_events {
+ };
+
+ #define NUM_STATES 17
+-struct st_events state_map[NUM_STATES];
++extern struct st_events state_map[NUM_STATES];
+
+ static const char *state_name[] = {
+ "One String",
+--- a/mysqlsniffer.c 2006-08-18 16:52:52.000000000 +0200
++++ b/mysqlsniffer.c 2026-05-08 23:15:33.379836217 +0200
+@@ -51,6 +51,12 @@ struct bpf_program fp;
+ char filter_exp[11] = "port ";
+ u_int total_mysql_pkts;
+ u_int total_mysql_bytes;
++// Definitions for variables declared extern in headers
++ulonglong decoded_len;
++struct st_options op;
++tag_id tags[MAX_TAGS];
++tag_id *tag;
++struct st_events state_map[NUM_STATES];
+
+ /*
+ Function protos
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mysqlsniffer.git/commitdiff/ac54478ade4686a357ea08c6fa8064ea182bc8f7
More information about the pld-cvs-commit
mailing list