diff options
author | Sam James <sam@gentoo.org> | 2021-12-29 23:41:22 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-29 23:41:49 +0000 |
commit | a086a26f2a5442546dd6fbd3ec94f2eb7286c538 (patch) | |
tree | c2cf15e7aaf141dffdcb98393797809f38adc394 /net-analyzer/pinger | |
parent | sys-libs/llvm-libunwind: Fix forcing test compiler in 14.x (diff) | |
download | gentoo-a086a26f2a5442546dd6fbd3ec94f2eb7286c538.tar.gz gentoo-a086a26f2a5442546dd6fbd3ec94f2eb7286c538.tar.bz2 gentoo-a086a26f2a5442546dd6fbd3ec94f2eb7286c538.zip |
net-analyzer/pinger: further musl build fixes
Bug: https://bugs.gentoo.org/712746
Closes: https://bugs.gentoo.org/830226
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/pinger')
-rw-r--r-- | net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch | 111 |
1 files changed, 107 insertions, 4 deletions
diff --git a/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch b/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch index c8cb99af3251..0777242ba6f8 100644 --- a/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch +++ b/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch @@ -1,17 +1,120 @@ -https://bugs.gentoo.org/712746 +From: Sam James <sam@gentoo.org> +Date: Wed, 29 Dec 2021 23:40:20 +0000 +Subject: [PATCH] Use <stdint.h> types + +Fixes musl compatibility. + +Bug: https://bugs.gentoo.org/712746 +--- a/src/fake_gtk.h ++++ b/src/fake_gtk.h +@@ -7,7 +7,6 @@ + #define GdkEvent int + #define gpointer int * + #define gboolean void +-#define gint int + #define GdkInputCondition int + + #else --- a/src/globals.h +++ b/src/globals.h -@@ -93,8 +93,8 @@ typedef struct host_data_t +@@ -62,10 +62,6 @@ + #define EXTERN extern + #endif + +-#ifndef __USE_MISC +-#define unsigned int uint; +-#endif +- + #define MAX_HOSTS 100 + /* Maximum size of domain name */ + #define MAX_DNAME_LEN 60 +@@ -93,8 +89,8 @@ typedef struct host_data_t struct timeval lastok_tv; /* timestamp of last ok echo */ int status; /* status of host, online, without reply, ... */ double delay; /* ping latency in miliseconds */ - u_int last_seq_sent; /* sequence nr. of last packet sent */ - u_int last_seq_recv; /* sequence nr. of last packet received */ -+ uint last_seq_sent; /* sequence nr. of last packet sent */ -+ uint last_seq_recv; /* sequence nr. of last packet received */ ++ unsigned int last_seq_sent; /* sequence nr. of last packet sent */ ++ unsigned int last_seq_recv; /* sequence nr. of last packet received */ unsigned long long nr_sent; /* number of send and received */ unsigned long long nr_recv; int ok_delay; /* time in ms, after we send next echo when OK (sucessfuly ping - ECHO REPLY) */ +@@ -164,9 +160,9 @@ typedef struct flstruct + #ifdef LOCAL + /* hosts specified only by domain names are resolved every 10 minutes. Specify + * other interval in seconds here if required. -1=disable. */ +-uint dns_check_s = 600; ++unsigned int dns_check_s = 600; + #else +-extern uint dns_check_s; ++extern unsigned int dns_check_s; + #endif + + EXTERN int mode; +--- a/src/interface_gtk.c ++++ b/src/interface_gtk.c +@@ -3,6 +3,7 @@ + #include "ping.h" + #include <gdk/gdkkeysyms.h> + #include <stdio.h> ++#include <stdint.h> + #include <string.h> + + GtkWidget *window; +@@ -13,7 +14,7 @@ static GtkWidget *scrolled_list; + static GtkWidget *tabs; + /* status bar for clock */ + static GtkWidget *status_bar; +-static guint status_bar_context; ++static unsigned int status_bar_context; + /* Box where store tabs and status bar */ + static GtkWidget *vbox; + +@@ -31,7 +32,7 @@ struct regular_disp_data + { + hosts_data *hosts; + int *stop_loop; +- guint disp_timeout_id; ++ unsigned int disp_timeout_id; + }; + + /* Interface display data */ +@@ -54,7 +55,7 @@ enum + static GtkWidget *create_list(hosts_data * hosts, int set_nr, + GtkListStore ** model); + static gboolean display_pinger_status(gpointer data); +-static gint gtk_delete_event(GtkWidget * widget, GdkEvent * event, ++static int gtk_delete_event(GtkWidget * widget, GdkEvent * event, + gpointer data); + static gchar *my_locale_to_utf8(char *text, char *file, int line); + +@@ -63,7 +64,7 @@ static void tab_refresh_rate(GtkWidget * widget, GdkEvent * event, + { + g_source_remove(int_disp_data->disp_timeout_id); + int_disp_data->disp_timeout_id = +- g_timeout_add((guint32) * (int *) data, display_pinger_status, ++ g_timeout_add((uint32_t) * (int *) data, display_pinger_status, + (gpointer) int_disp_data); + } + +@@ -462,7 +463,7 @@ static GtkWidget *create_list(hosts_data * hosts, int set_nr, + } + + /* delete_event callback function. data is (hosts_data *) */ +-static gint gtk_delete_event(GtkWidget * widget, ++static int gtk_delete_event(GtkWidget * widget, + GdkEvent * event, gpointer data) + { + if (free_sockets((hosts_data *) data)) +@@ -532,7 +533,7 @@ void gtk_gui_loop(hosts_data * hosts, int *stop_loop) + disp_data.stop_loop = stop_loop; + + disp_data.disp_timeout_id = +- g_timeout_add((guint32) hosts->titles->refresh_int, ++ g_timeout_add((uint32_t) hosts->titles->refresh_int, + display_pinger_status, (gpointer) & disp_data); + display_pinger_status((gpointer) & disp_data); + --- a/src/ping.c +++ b/src/ping.c @@ -35,10 +35,10 @@ |