The signal handler for SIGINT/TERM/QUIT and, importantly, SIGPIPE tries
to write an informational message to stderr. When however stderr is
redirected to a closed pipe, this will cause (another) SIGPIPE, and in
turn the signal handler will get called again, and again and again.
Since we intend to exit rtl_fm anyways, we can just ignore this signal.
Librtlsdr has a workaround for libusb versions that lack
libusb_handle_events_timeout_completed, which was added in version 1.0.9
(released 2012-04-02). The workaround is always applied unless the
HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED macro is set, but the cmake
code that sets this macro was removed in
849f8efca4. As a result, the workaround is
now always applied. This results in an extra 1-second delay whenever a
GNU Radio flowgraph containing an RTL-SDR block is stopped, which makes
operations like switching between demodulators in Gqrx annoyingly slow.
To solve this problem, I've simply removed the workaround, as it should
no longer be needed.
I wonder if perhaps the workaround recently applied in
2659e2df31 might stem from the same bug.
Fix failures with some GCC versions:
/usr/src/packages/BUILD/src/rtl_tcp.c:90:24: error: initializer element is not constant
static int llbuf_num = DEFAULT_MAX_NUM_BUFFERS;
Fixes: 641c22 ("rtl_tcp: Extracted some constants out of printf strings")
Change-Id: Ia9e18d4c22d957f561dcdaf2657bb6d201374375
In r82xx_read, there is a 1-byte I2C write followed by the I2C read. If
this I2C write fails, r82xx_read correctly bails out but may return 0.
Callers that check whether (rc < 0) will assume that the buffer was written
when it has not been, e.g. in r82xx_set_tv_standard where
priv->fil_cal_code = data[4] & 0x0f;
consumes a garbage value for data[4].
This change resolves that issue by copying the error path from r82xx_write.
We certainly don't use quilt, as we build packages using
git-buildpackage.
This is what likely causes build failures on our osmocom nightly
builds stating
gbp:error: Non-native package 'rtl-sdr' has invalid version '0.5.4.32.3d7c'
If the package now is 'native', the errors should be gone.
As several current LTS distributions currently ship with CMake
< 3.12.0, add a work-around for CMake Issue 16967.
Otherwise we get:
CMake Error at
/usr/share/cmake-3.7/Modules/CheckCXXSourceCompiles.cmake:64 (try_compile):
Unknown extension ".cxx" for file
/tmp/rtl-sdr/build/CMakeFiles/CMakeTmp/src.cxx
try_compile() works only for enabled languages. Currently these are:
C
New minimum version is CMake 3.7.2.
This patch has been rebased to incorporate changes that happened
since the creation of the original patch.
Original Author: A. Maitland Bottoms <bottoms@debian.org>, 07 Sep 2018
Older versions of GCC will complain that it can be used
uninitialized - which is not the case, but it breaks our Jenkins
build as we build with -Werror.
I've prepared this patch in response to Debian bug #870804https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870804
It passes the text from the -a and -p options through
getaddrinfo() and uses the first result that has a valid
socket with a successful bind.
While not a complete bind to all possible valid names, it
does appear to address the use case of the bug submitter
without completely changing the program flow.
librtlsdr.pc should declare -lusb-1.0 in Libs.private section
to exclude usb library from dynamic linking.
References to libusb headers are not needed in Cflags, since these
headers are not used by external rtlsdr API, but this is optional.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784912
When trying to build a simple program which uses librtlsdr
as a subproject on Windows, CMake reported several problems
which were solved by:
- Added complete name of libusb in FindLibUSB module.
- Replaced CMAKE_SOURCE_DIR to PROJECT_SOURCE_DIR in src/CMakeLists.txt.
- Replaced header file <afxres.h> in src/rtlsdr.rc.in (only present when windows MFC is
installed) by <windows.h> which defines the same constants.
This is an import of the rtl_biast command line tool from the
rtlsdrblog github repository. It's easier to include it here than
try to package up the separate application because they both
wish to install dynamic libraries.
Gets rid of librt, which doesn't exist on OpenBSD. The version of
librtlsdr in the OpenBSD ports tree is extremely old (~2013), so this
should help some users.
Tested against tag 0.6.0, but it should apply just fine to HEAD.