diff options
| -rw-r--r-- | recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch | 298 | ||||
| -rw-r--r-- | recipes-extended/irqbalance/irqbalance_git.bb | 1 |
2 files changed, 299 insertions, 0 deletions
diff --git a/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch b/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch new file mode 100644 index 00000000..f40d6897 --- /dev/null +++ b/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch | |||
| @@ -0,0 +1,298 @@ | |||
| 1 | From c25dfc295df789ceb1ed890ab7e5a9694503d829 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rosen Penev <rosenp@gmail.com> | ||
| 3 | Date: Sun, 31 Mar 2024 14:31:22 -0700 | ||
| 4 | Subject: [PATCH] add void to fix strict-prototypes | ||
| 5 | |||
| 6 | This becomes a hard error with C23 | ||
| 7 | |||
| 8 | Signed-off-by: Rosen Penev <rosenp@gmail.com> | ||
| 9 | Upstream-Status: Backport [https://github.com/Irqbalance/irqbalance/commit/b6a831d692ed7e12db7748db49b3b39516d151d2] | ||
| 10 | --- | ||
| 11 | irqbalance.c | 2 +- | ||
| 12 | irqbalance.h | 2 +- | ||
| 13 | procinterrupts.c | 2 +- | ||
| 14 | ui/helpers.c | 2 +- | ||
| 15 | ui/helpers.h | 2 +- | ||
| 16 | ui/irqbalance-ui.c | 4 ++-- | ||
| 17 | ui/irqbalance-ui.h | 5 ++--- | ||
| 18 | ui/ui.c | 24 ++++++++++++------------ | ||
| 19 | ui/ui.h | 26 +++++++++++++------------- | ||
| 20 | 9 files changed, 34 insertions(+), 35 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/irqbalance.c b/irqbalance.c | ||
| 23 | index e8d9ba9..d7b4184 100644 | ||
| 24 | --- a/irqbalance.c | ||
| 25 | +++ b/irqbalance.c | ||
| 26 | @@ -554,7 +554,7 @@ out: | ||
| 27 | return TRUE; | ||
| 28 | } | ||
| 29 | |||
| 30 | -int init_socket() | ||
| 31 | +int init_socket(void) | ||
| 32 | { | ||
| 33 | struct sockaddr_un addr; | ||
| 34 | memset(&addr, 0, sizeof(struct sockaddr_un)); | ||
| 35 | diff --git a/irqbalance.h b/irqbalance.h | ||
| 36 | index e7f6b94..96ee07a 100644 | ||
| 37 | --- a/irqbalance.h | ||
| 38 | +++ b/irqbalance.h | ||
| 39 | @@ -36,7 +36,7 @@ extern char *classes[]; | ||
| 40 | extern void parse_cpu_tree(void); | ||
| 41 | extern void clear_work_stats(void); | ||
| 42 | extern void parse_proc_interrupts(void); | ||
| 43 | -extern GList* collect_full_irq_list(); | ||
| 44 | +extern GList* collect_full_irq_list(void); | ||
| 45 | extern void parse_proc_stat(void); | ||
| 46 | extern void set_interrupt_count(int number, uint64_t count); | ||
| 47 | extern void set_msi_interrupt_numa(int number); | ||
| 48 | diff --git a/procinterrupts.c b/procinterrupts.c | ||
| 49 | index 9015177..938cfad 100644 | ||
| 50 | --- a/procinterrupts.c | ||
| 51 | +++ b/procinterrupts.c | ||
| 52 | @@ -204,7 +204,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) | ||
| 53 | info->name = strdup(irq_fullname); | ||
| 54 | } | ||
| 55 | |||
| 56 | -GList* collect_full_irq_list() | ||
| 57 | +GList* collect_full_irq_list(void) | ||
| 58 | { | ||
| 59 | GList *tmp_list = NULL; | ||
| 60 | FILE *file; | ||
| 61 | diff --git a/ui/helpers.c b/ui/helpers.c | ||
| 62 | index 5d71275..14861cb 100644 | ||
| 63 | --- a/ui/helpers.c | ||
| 64 | +++ b/ui/helpers.c | ||
| 65 | @@ -163,7 +163,7 @@ void dump_node(cpu_node_t *node, void *data __attribute__((unused))) | ||
| 66 | } | ||
| 67 | } | ||
| 68 | |||
| 69 | -void dump_tree() | ||
| 70 | +void dump_tree(void) | ||
| 71 | { | ||
| 72 | for_each_node(tree, dump_node, NULL); | ||
| 73 | } | ||
| 74 | diff --git a/ui/helpers.h b/ui/helpers.h | ||
| 75 | index b8d9fcc..922914b 100644 | ||
| 76 | --- a/ui/helpers.h | ||
| 77 | +++ b/ui/helpers.h | ||
| 78 | @@ -25,7 +25,7 @@ void for_each_node(GList *list, void (*fp)(cpu_node_t *node, void *data), void * | ||
| 79 | |||
| 80 | void dump_irq(irq_t *irq, void *data __attribute__((unused))); | ||
| 81 | void dump_node(cpu_node_t *node, void *data __attribute__((unused))); | ||
| 82 | -void dump_tree(); | ||
| 83 | +void dump_tree(void); | ||
| 84 | |||
| 85 | |||
| 86 | #endif /* HELPERS_H */ | ||
| 87 | diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c | ||
| 88 | index 3ad3553..132bb45 100644 | ||
| 89 | --- a/ui/irqbalance-ui.c | ||
| 90 | +++ b/ui/irqbalance-ui.c | ||
| 91 | @@ -23,7 +23,7 @@ GMainLoop *main_loop; | ||
| 92 | int is_tree = 1; | ||
| 93 | static int default_bufsz = 8192; | ||
| 94 | |||
| 95 | -struct msghdr * create_credentials_msg() | ||
| 96 | +struct msghdr * create_credentials_msg(void) | ||
| 97 | { | ||
| 98 | struct ucred *credentials = malloc(sizeof(struct ucred)); | ||
| 99 | credentials->pid = getpid(); | ||
| 100 | @@ -46,7 +46,7 @@ struct msghdr * create_credentials_msg() | ||
| 101 | return msg; | ||
| 102 | } | ||
| 103 | |||
| 104 | -int init_connection() | ||
| 105 | +int init_connection(void) | ||
| 106 | { | ||
| 107 | struct sockaddr_un addr; | ||
| 108 | memset(&addr, 0, sizeof(struct sockaddr_un)); | ||
| 109 | diff --git a/ui/irqbalance-ui.h b/ui/irqbalance-ui.h | ||
| 110 | index fba7e7c..e9f6114 100644 | ||
| 111 | --- a/ui/irqbalance-ui.h | ||
| 112 | +++ b/ui/irqbalance-ui.h | ||
| 113 | @@ -70,8 +70,8 @@ typedef struct setup { | ||
| 114 | |||
| 115 | /* Function prototypes */ | ||
| 116 | |||
| 117 | -struct msghdr * create_credentials_msg(); | ||
| 118 | -int init_connection(); | ||
| 119 | +struct msghdr * create_credentials_msg(void); | ||
| 120 | +int init_connection(void); | ||
| 121 | void send_settings(char *data); | ||
| 122 | char * get_data(char *string); | ||
| 123 | void parse_setup(char *setup_data); | ||
| 124 | @@ -81,7 +81,6 @@ void assign_cpu_lists(cpu_node_t *node, void *data); | ||
| 125 | void assign_cpu_mask(cpu_node_t *node, void *data); | ||
| 126 | void parse_into_tree(char *data); | ||
| 127 | gboolean rescan_tree(gpointer data); | ||
| 128 | -int main(); | ||
| 129 | |||
| 130 | |||
| 131 | #endif /* IRQBALANCE_UI_H */ | ||
| 132 | diff --git a/ui/ui.c b/ui/ui.c | ||
| 133 | index 6ff3305..bc1d743 100644 | ||
| 134 | --- a/ui/ui.c | ||
| 135 | +++ b/ui/ui.c | ||
| 136 | @@ -17,7 +17,7 @@ char *IRQ_CLASS_TO_STR[] = { | ||
| 137 | "10-Gigabit Ethernet", | ||
| 138 | "Virt Event"}; | ||
| 139 | |||
| 140 | -void show_frame() | ||
| 141 | +void show_frame(void) | ||
| 142 | { | ||
| 143 | int i; | ||
| 144 | attrset(COLOR_PAIR(4)); | ||
| 145 | @@ -33,7 +33,7 @@ void show_frame() | ||
| 146 | } | ||
| 147 | } | ||
| 148 | |||
| 149 | -void show_footer() | ||
| 150 | +void show_footer(void) | ||
| 151 | { | ||
| 152 | char footer[COLS]; | ||
| 153 | snprintf(footer, COLS - 1, | ||
| 154 | @@ -149,7 +149,7 @@ void print_cpu_line(cpu_ban_t *cpu, void *data) | ||
| 155 | (*line_offset)++; | ||
| 156 | } | ||
| 157 | |||
| 158 | -void print_all_cpus() | ||
| 159 | +void print_all_cpus(void) | ||
| 160 | { | ||
| 161 | if(all_cpus == NULL) { | ||
| 162 | for_each_node(tree, get_cpu, NULL); | ||
| 163 | @@ -168,7 +168,7 @@ void add_banned_cpu(int *banned_cpu, void *data) | ||
| 164 | snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu); | ||
| 165 | } | ||
| 166 | |||
| 167 | -void display_banned_cpus() | ||
| 168 | +void display_banned_cpus(void) | ||
| 169 | { | ||
| 170 | char banned_cpus[1024] = "Banned CPU numbers: \0"; | ||
| 171 | if(g_list_length(setup.banned_cpus) > 0) { | ||
| 172 | @@ -221,7 +221,7 @@ void get_cpu(cpu_node_t *node, void *data __attribute__((unused))) | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | -void handle_cpu_banning() | ||
| 177 | +void handle_cpu_banning(void) | ||
| 178 | { | ||
| 179 | GList *tmp = g_list_copy_deep(all_cpus, copy_cpu_ban, NULL); | ||
| 180 | attrset(COLOR_PAIR(5)); | ||
| 181 | @@ -371,7 +371,7 @@ void print_irq_line(irq_t *irq, void *data) | ||
| 182 | |||
| 183 | } | ||
| 184 | |||
| 185 | -void print_all_irqs() | ||
| 186 | +void print_all_irqs(void) | ||
| 187 | { | ||
| 188 | int *line = malloc(sizeof(int)); | ||
| 189 | *line = 4; | ||
| 190 | @@ -418,13 +418,13 @@ void copy_irqs_from_nodes(cpu_node_t *node, void *data __attribute__((unused))) | ||
| 191 | } | ||
| 192 | } | ||
| 193 | |||
| 194 | -void get_all_irqs() | ||
| 195 | +void get_all_irqs(void) | ||
| 196 | { | ||
| 197 | all_irqs = g_list_copy_deep(setup.banned_irqs, copy_irq, NULL); | ||
| 198 | for_each_node(tree, copy_irqs_from_nodes, NULL); | ||
| 199 | } | ||
| 200 | |||
| 201 | -void handle_irq_banning() | ||
| 202 | +void handle_irq_banning(void) | ||
| 203 | { | ||
| 204 | GList *tmp = g_list_copy_deep(all_irqs, copy_irq, NULL); | ||
| 205 | attrset(COLOR_PAIR(5)); | ||
| 206 | @@ -520,7 +520,7 @@ void handle_irq_banning() | ||
| 207 | } | ||
| 208 | } | ||
| 209 | |||
| 210 | -void init() | ||
| 211 | +void init(void) | ||
| 212 | { | ||
| 213 | signal(SIGINT, close_window); | ||
| 214 | initscr(); | ||
| 215 | @@ -556,7 +556,7 @@ void close_window(int sig __attribute__((unused))) | ||
| 216 | exit(EXIT_SUCCESS); | ||
| 217 | } | ||
| 218 | |||
| 219 | -void settings() | ||
| 220 | +void settings(void) | ||
| 221 | { | ||
| 222 | clear(); | ||
| 223 | char *setup_data = get_data(SETUP); | ||
| 224 | @@ -620,7 +620,7 @@ void settings() | ||
| 225 | free(setup_data); | ||
| 226 | } | ||
| 227 | |||
| 228 | -void setup_irqs() | ||
| 229 | +void setup_irqs(void) | ||
| 230 | { | ||
| 231 | clear(); | ||
| 232 | get_all_irqs(); | ||
| 233 | @@ -720,7 +720,7 @@ void display_tree_node(cpu_node_t *node, void *data) | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 237 | -void display_tree() | ||
| 238 | +void display_tree(void) | ||
| 239 | { | ||
| 240 | clear(); | ||
| 241 | char *setup_data = get_data(SETUP); | ||
| 242 | diff --git a/ui/ui.h b/ui/ui.h | ||
| 243 | index 0aa8280..bb017e9 100644 | ||
| 244 | --- a/ui/ui.h | ||
| 245 | +++ b/ui/ui.h | ||
| 246 | @@ -15,39 +15,39 @@ extern GList *tree; | ||
| 247 | extern setup_t setup; | ||
| 248 | extern int is_tree; | ||
| 249 | |||
| 250 | -void show_frame(); | ||
| 251 | -void show_footer(); | ||
| 252 | +void show_frame(void); | ||
| 253 | +void show_footer(void); | ||
| 254 | |||
| 255 | char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset); | ||
| 256 | int get_valid_sleep_input(int column_offest); | ||
| 257 | |||
| 258 | void get_banned_cpu(int *cpu, void *data); | ||
| 259 | void print_cpu_line(cpu_ban_t *cpu, void *data); | ||
| 260 | -void print_all_cpus(); | ||
| 261 | +void print_all_cpus(void); | ||
| 262 | void add_banned_cpu(int *banned_cpu, void *data); | ||
| 263 | -void display_banned_cpus(); | ||
| 264 | +void display_banned_cpus(void); | ||
| 265 | int toggle_cpu(GList *cpu_list, int cpu_number); | ||
| 266 | void get_new_cpu_ban_values(cpu_ban_t *cpu, void *data); | ||
| 267 | -void get_cpu(); | ||
| 268 | -void handle_cpu_banning(); | ||
| 269 | +void get_cpu(cpu_node_t *node, void *data); | ||
| 270 | +void handle_cpu_banning(void); | ||
| 271 | |||
| 272 | void copy_assigned_obj(int *number, void *data); | ||
| 273 | void print_assigned_objects_string(irq_t *irq, int *line_offset); | ||
| 274 | void print_irq_line(irq_t *irq, void *data); | ||
| 275 | -void print_all_irqs(); | ||
| 276 | +void print_all_irqs(void); | ||
| 277 | int toggle_irq(GList *irq_list, int position); | ||
| 278 | void get_new_irq_ban_values(irq_t *irq, void *data); | ||
| 279 | void copy_irqs_from_nodes(cpu_node_t *node, void *data); | ||
| 280 | -void get_all_irqs(); | ||
| 281 | -void handle_irq_banning(); | ||
| 282 | +void get_all_irqs(void); | ||
| 283 | +void handle_irq_banning(void); | ||
| 284 | |||
| 285 | -void init(); | ||
| 286 | +void init(void); | ||
| 287 | void close_window(int sig); | ||
| 288 | -void settings(); | ||
| 289 | -void setup_irqs(); | ||
| 290 | +void settings(void); | ||
| 291 | +void setup_irqs(void); | ||
| 292 | void display_tree_node_irqs(irq_t *irq, void *data); | ||
| 293 | void display_tree_node(cpu_node_t *node, void *data); | ||
| 294 | -void display_tree(); | ||
| 295 | +void display_tree(void); | ||
| 296 | |||
| 297 | |||
| 298 | #endif /* UI_H */ | ||
diff --git a/recipes-extended/irqbalance/irqbalance_git.bb b/recipes-extended/irqbalance/irqbalance_git.bb index aa7f0de9..068cf12e 100644 --- a/recipes-extended/irqbalance/irqbalance_git.bb +++ b/recipes-extended/irqbalance/irqbalance_git.bb | |||
| @@ -10,6 +10,7 @@ PV = "1.8.0+git" | |||
| 10 | SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \ | 10 | SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \ |
| 11 | file://add-initscript.patch \ | 11 | file://add-initscript.patch \ |
| 12 | file://irqbalance-Add-status-and-reload-commands.patch \ | 12 | file://irqbalance-Add-status-and-reload-commands.patch \ |
| 13 | file://0001-add-void-to-fix-strict-prototypes.patch \ | ||
| 13 | " | 14 | " |
| 14 | 15 | ||
| 15 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
