From 09746800222bf1943f311832a264e90b77a8c6cf Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Mon, 27 Dec 2021 08:33:53 -0600 Subject: [PATCH 1/2] Fix compiler error from async code --- src/iofunc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iofunc.c b/src/iofunc.c index 58db32705..bc5ca75bd 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -373,7 +373,11 @@ extern int is_uh_radio_fd(int fd); */ static ssize_t port_read_generic(hamlib_port_t *p, void *buf, size_t count, int direct) { +#if ASYNC_BUG int fd = direct ? p->fd : p->fd_sync_read; +#else + int fd = direct; +#endif int i; ssize_t ret; From 2f15661067ae132887f159f9849050c61bb2d9a4 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Mon, 27 Dec 2021 09:03:34 -0600 Subject: [PATCH 2/2] Update testrigcaps.c for Linux 64-bit build --- tests/testrigcaps.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/testrigcaps.c b/tests/testrigcaps.c index 57160f67e..1cf6f44b9 100644 --- a/tests/testrigcaps.c +++ b/tests/testrigcaps.c @@ -4,7 +4,7 @@ int main() { printf("Check rig_caps offsets\n"); - printf("If changed can affect shared library API\n"); + printf("If changed will break shared library API\n"); RIG *rig; int retcode = 0; rig_set_debug_level(RIG_DEBUG_NONE); @@ -18,7 +18,7 @@ int main() #elif defined(WIN32) || defined (_WIN32) || defined(__WIN32__) int expected = 10144; // mingw32 #else - int expected = 13280; // should be most 64-bit compilers + int expected = 13328; // should be most 64-bit compilers #endif if (offset == 9384) { expected = 9384; } // 32-bit Intel @@ -41,7 +41,7 @@ int main() #elif defined(WIN32) || defined (_WIN32) || defined(__WIN32__) expected = 10448; // mingw32 #else - expected = 13696; + expected = 14188; #endif if (offset == 9676) { expected = 9676; } // 32-bit Intel @@ -52,7 +52,11 @@ int main() { printf("Warning...offset of power_max has changed!!!\n"); printf("was %d, now %lu\n", expected, offset); - retcode = 0; + retcode = 2; + } + if (retcode == 0) + { + printf("Offsets are OK (i.e. have not changed)\n"); } return retcode;