mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
community/pilot-link: fix build with gcc 14
This commit is contained in:
parent
a2e900d123
commit
5cf055de69
@ -4,7 +4,7 @@
|
||||
pkgname=pilot-link
|
||||
pkgver=0.12.5_git20240103
|
||||
_commit="14338868111ce592c7ca7918a1f8a32ceecb7caf"
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="A suite of tools for connecting to PalmOS handheld devices"
|
||||
url="https://github.com/desrod/pilot-link"
|
||||
license="GPL-2.0-only"
|
||||
@ -31,9 +31,10 @@ source="${pkgname}_$_commit.tar.gz::https://github.com/desrod/pilot-link/archive
|
||||
pilot-link-png14.patch
|
||||
fix-printf-string-literals.patch
|
||||
fix-configure-checks.patch
|
||||
fix-doc-generation.patch"
|
||||
fix-doc-generation.patch
|
||||
gcc14.patch
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
options="!check" #no checks
|
||||
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
|
||||
|
||||
prepare() {
|
||||
@ -59,6 +60,10 @@ build() {
|
||||
LIBXSLTPROC="xsltproc" make
|
||||
}
|
||||
|
||||
check() {
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
depends="$pkgname-libs"
|
||||
make DESTDIR="$pkgdir" install
|
||||
@ -75,4 +80,5 @@ cf37e4b51d261431f42054cf05d1603e66d8eca0604ae042371c7284c8e668f49cadb3d75cf67eaf
|
||||
359cf02da308bbd9d24716ac022738598de03befd18932ba1f827e51320650ed36da5fcd203a4adaa8d04a98d4f84aac61e594320af1fc316873a9c06d1fb147 fix-printf-string-literals.patch
|
||||
f68d98c4cc458cc5c030af2c8bcb9e9cffda1408b3fa0b9f4679098123fe11a63a92f222cb2a7f6195f130201f293dbd5fee5b84ec65f22ac09f33e43448ffe8 fix-configure-checks.patch
|
||||
6175ddb5e1b454c83fbf09b0ec4dc690ce2125288de19e5183dc6554b1a865a3351367e4b2c45905ee3a3c5e0d3013dec69840495cef8e1d23036a73bfed2bb4 fix-doc-generation.patch
|
||||
e64519f9e60d66d4831f92e1523fbd11a1e6c8da644e019430d0d9b203a4211726bc6ddf40d7584eda444146559f17e32ef6a63e526ce4c954acb5a69d19bbe7 gcc14.patch
|
||||
"
|
||||
|
82
community/pilot-link/gcc14.patch
Normal file
82
community/pilot-link/gcc14.patch
Normal file
@ -0,0 +1,82 @@
|
||||
--- pilot-link-14338868-origin/libpisock/linuxusb.c
|
||||
+++ pilot-link-14338868/libpisock/linuxusb.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/socket.h>
|
||||
|
||||
#include "pi-debug.h"
|
||||
#include "pi-source.h"
|
||||
@@ -48,8 +49,8 @@
|
||||
|
||||
static int u_open(pi_socket_t *ps, struct pi_sockaddr *addr, size_t addrlen);
|
||||
static int u_close(pi_socket_t *ps);
|
||||
-static int u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags);
|
||||
-static int u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
|
||||
+static ssize_t u_write(pi_socket_t *ps, const unsigned char *buf, size_t len, int flags);
|
||||
+static ssize_t u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags);
|
||||
static int u_poll(pi_socket_t *ps, int timeout);
|
||||
static int u_flush(pi_socket_t *ps, int flags);
|
||||
|
||||
@@ -188,8 +189,8 @@
|
||||
* Returns: Nothing
|
||||
*
|
||||
***********************************************************************/
|
||||
-static int
|
||||
-u_write(pi_socket_t *ps, unsigned char *buf, size_t len, int flags)
|
||||
+static ssize_t
|
||||
+u_write(pi_socket_t *ps, const unsigned char *buf, size_t len, int flags)
|
||||
{
|
||||
int total,
|
||||
nwrote;
|
||||
@@ -281,7 +282,7 @@
|
||||
* Returns: number of bytes read or negative otherwise
|
||||
*
|
||||
***********************************************************************/
|
||||
-static int
|
||||
+static ssize_t
|
||||
u_read(pi_socket_t *ps, pi_buffer_t *buf, size_t len, int flags)
|
||||
{
|
||||
ssize_t rbuf = 0,
|
||||
--- pilot-link-14338868-origin/libpisync/util.c
|
||||
+++ pilot-link-14338868/libpisync/util.c
|
||||
@@ -120,7 +120,7 @@
|
||||
obl = bytes * 4 + 1;
|
||||
*ptext = ob = malloc(obl);
|
||||
|
||||
- if (iconv(cd, &text, &ibl, &ob, &obl) == (size_t)-1)
|
||||
+ if (iconv(cd, (char ** restrict)&text, &ibl, &ob, &obl) == (size_t)-1)
|
||||
return -1;
|
||||
*ob = '\0';
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
obl = bytes * 4 + 1;
|
||||
*text = ob = malloc(obl);
|
||||
|
||||
- if (iconv(cd, &ptext, &ibl, &ob, &obl) == (size_t)-1)
|
||||
+ if (iconv(cd, (char ** restrict)&ptext, &ibl, &ob, &obl) == (size_t)-1)
|
||||
return -1;
|
||||
*ob = '\0';
|
||||
|
||||
--- pilot-link-14338868-origin/src/pilot-read-todos.c
|
||||
+++ pilot-link-14338868/src/pilot-read-todos.c
|
||||
@@ -217,7 +217,7 @@
|
||||
}
|
||||
else {
|
||||
if (pi_file_read_record
|
||||
- (pif, i, (void *) &ptr, &len, &attr, &category,
|
||||
+ (pif, i, (void *) &ptr, (size_t *)&len, &attr, &category,
|
||||
0))
|
||||
break;
|
||||
|
||||
--- pilot-link-14338868-origin/tests/packers.c
|
||||
+++ pilot-link-14338868/tests/packers.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
+#include "pi-debug.h"
|
||||
#include "pi-source.h"
|
||||
#include "pi-socket.h"
|
||||
#include "pi-memo.h"
|
Loading…
Reference in New Issue
Block a user