aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2025-12-15 07:06:50 +0100
committerNIIBE Yutaka <[email protected]>2025-12-15 07:06:50 +0100
commit527c7fff9679afe08927943b9da654e27e75ba93 (patch)
tree23186fe1c378978b98483fa1ebe19906cd850fe5 /src
parentFix build with libassuan 2. (diff)
downloadgpgme-527c7fff9679afe08927943b9da654e27e75ba93.tar.gz
gpgme-527c7fff9679afe08927943b9da654e27e75ba93.zip
Fix function prototypes to match ones in libassuan.
* src/assuan-support.c (my_read, my_write): Use ssize_t. (my_socket, my_connect): Use int instead of assuan_fd_t for older libassuan. * tests/gpg/t-encrypt-large.c (read_cb, write_cb): Use gpgme_ssize_t. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/assuan-support.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/assuan-support.c b/src/assuan-support.c
index f473abf2..384b67b9 100644
--- a/src/assuan-support.c
+++ b/src/assuan-support.c
@@ -126,7 +126,7 @@ my_close (assuan_context_t ctx, assuan_fd_t fd)
}
-static gpgme_ssize_t
+static ssize_t
my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size)
{
(void)ctx;
@@ -134,7 +134,7 @@ my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size)
}
-static gpgme_ssize_t
+static ssize_t
my_write (assuan_context_t ctx, assuan_fd_t fd, const void *buffer, size_t size)
{
(void)ctx;
@@ -351,6 +351,7 @@ my_socketpair (assuan_context_t ctx, int namespace, int style,
}
+#if ASSUAN_VERSION_NUMBER >= 0x030000
static assuan_fd_t
my_socket (assuan_context_t ctx, int namespace, int style, int protocol)
{
@@ -366,6 +367,23 @@ my_connect (assuan_context_t ctx, assuan_fd_t sock, struct sockaddr *addr,
(void)ctx;
return _gpgme_io_connect ((int)sock, addr, length);
}
+#else
+static int
+my_socket (assuan_context_t ctx, int namespace, int style, int protocol)
+{
+ (void)ctx;
+ return _gpgme_io_socket (namespace, style, protocol);
+}
+
+
+static int
+my_connect (assuan_context_t ctx, int sock, struct sockaddr *addr,
+ socklen_t length)
+{
+ (void)ctx;
+ return _gpgme_io_connect (sock, addr, length);
+}
+#endif
/* Note for Windows: Ignore the incompatible pointer type warning for