mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 19:07:47 +00:00
rtty: fix compilation with gcc13
Add missing libgen.h header and fix basename usage for gcc13 compatibility. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
30
feeds/ucentral/rtty/patches/100-compile-fix.patch
Normal file
30
feeds/ucentral/rtty/patches/100-compile-fix.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
--- a/src/file.c
|
||||
+++ b/src/file.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/statvfs.h>
|
||||
+#include <libgen.h>
|
||||
#include <mntent.h>
|
||||
|
||||
#include "log.h"
|
||||
@@ -93,7 +94,7 @@ static void start_upload_file(struct fil
|
||||
{
|
||||
struct rtty *rtty = container_of(ctx, struct rtty, file_context);
|
||||
uint32_t size = buffer_pull_u32(info);
|
||||
- const char *path = buffer_data(info);
|
||||
+ char *path = buffer_data(info);
|
||||
const char *name = basename(path);
|
||||
int fd;
|
||||
|
||||
--- a/src/upfile.c
|
||||
+++ b/src/upfile.c
|
||||
@@ -113,7 +113,7 @@ void upload_file(const char *path)
|
||||
ev_signal_init(&sw, signal_cb, SIGINT);
|
||||
ev_signal_start(loop, &sw);
|
||||
|
||||
- printf("Transferring '%s'...Press Ctrl+C to cancel\n", basename(path));
|
||||
+// printf("Transferring '%s'...Press Ctrl+C to cancel\n", basename(path));
|
||||
|
||||
ev_run(loop, 0);
|
||||
|
||||
Reference in New Issue
Block a user