Fix apex build and warning message

https://github.com/Hamlib/Hamlib/issues/1159
pull/1215/head
Mike Black W9MDB 2022-12-25 22:26:52 -06:00
rodzic bc6c14e430
commit 0450b36c67
3 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := apex.c sharedloop.c
LOCAL_SRC_FILES := apex.c apex.h sharedloop.c
LOCAL_MODULE := apex
LOCAL_CFLAGS :=

Wyświetl plik

@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libhamlib-apex.la
libhamlib_apex_la_SOURCES = apex.c sharedloop.c
libhamlib_apex_la_SOURCES = apex.c apex.h sharedloop.c
EXTRA_DIST = Android.mk

Wyświetl plik

@ -6,7 +6,7 @@
float apex_azimuth;
char apex_info[64];
char apex_info[65];
static pthread_t apex_read_thread;
@ -27,7 +27,7 @@ static int apex_get_string(ROT *rot, char *s, int maxlen)
retval = read_string(&rs->rotport, (unsigned char *)buf,
sizeof(buf),
"\n", strlen("\n"), sizeof(buf), 1);
strncpy(s, buf, maxlen);
strncpy(s, buf, 64);
strtok(s, "\r\n"); // truncate any CR/LF
rig_debug(RIG_DEBUG_VERBOSE, "%s: %d bytes '%s'\n", __func__, retval, s);