Lower dependency to glib 2.32.

By avoiding g_slist_copy_deep() for now, we can easily allow libsigrok
to build against glib 2.32 (less hassle for users of stable/older
distros or OSes).
This commit is contained in:
Uwe Hermann 2015-01-29 08:51:31 +01:00
parent 8656a71790
commit 5801d558e7
3 changed files with 7 additions and 7 deletions

2
README
View File

@ -36,7 +36,7 @@ Requirements for the C library:
- automake >= 1.11 (only needed when building from git)
- libtool (only needed when building from git)
- pkg-config >= 0.22
- libglib >= 2.34.0
- libglib >= 2.32.0
- libzip >= 0.10
- libserialport >= 0.1.0 (optional, used by some drivers)
- librevisa >= 0.0.20130412 (optional, used by some drivers)

View File

@ -260,8 +260,8 @@ AM_CONDITIONAL(NEED_RPC, test "x$have_rpc" != "x0")
# libglib-2.0 is always needed. Abort if it's not found.
# Note: glib-2.0 is part of the libsigrok API (hard pkg-config requirement).
# We require at least 2.34.0 due to e.g. g_slist_deep_copy().
AM_PATH_GLIB_2_0([2.34.0],
# We require at least 2.32.0 due to e.g. g_variant_new_fixed_array().
AM_PATH_GLIB_2_0([2.32.0],
[LIB_CFLAGS="$LIB_CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"])
# libzip is always needed. Abort if it's not found.
@ -554,13 +554,13 @@ echo "Detected libraries:"
echo
# Note: This only works for libs with pkg-config integration.
for lib in "glib-2.0 >= 2.34.0" "libzip >= 0.10" "libserialport >= 0.2.0" \
for lib in "glib-2.0 >= 2.32.0" "libzip >= 0.10" "libserialport >= 0.2.0" \
"librevisa >= 0.0.20130412" "libusb-1.0 >= 1.0.16" "libftdi >= 0.16" \
"libftdi1 >= 1.0" "libgpib" "glibmm-2.4 >= 2.32.0" \
"pygobject-3.0 >= 3.0.0" "check >= 0.9.4"
do
optional="OPTIONAL"
if test "x$lib" = "xglib-2.0 >= 2.34.0"; then optional="REQUIRED"; fi
if test "x$lib" = "xglib-2.0 >= 2.32.0"; then optional="REQUIRED"; fi
if test "x$lib" = "xlibzip >= 0.10"; then optional="REQUIRED"; fi
if `$PKG_CONFIG --exists $lib`; then
ver=`$PKG_CONFIG --modversion $lib`

View File

@ -984,8 +984,8 @@ SR_PRIV int sr_packet_copy(const struct sr_datafeed_packet *packet,
case SR_DF_META:
meta = packet->payload;
meta_copy = g_malloc(sizeof(struct sr_datafeed_meta));
meta_copy->config = g_slist_copy_deep(meta->config,
(GCopyFunc)copy_src, NULL);
meta_copy->config = g_slist_copy(meta->config);
g_slist_foreach(meta_copy->config, (GCopyFunc)copy_src, NULL);
(*copy)->payload = meta_copy;
break;
case SR_DF_LOGIC: