mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-01 07:27:43 +00:00
libmms: bump version, add patch for architectures without unaligned access
Closes #2581 Signed-off-by: Paul Burton <Paul.Burton@imgtec.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
a05bb5815d
commit
e094140344
20
CHANGES
20
CHANGES
@ -21,20 +21,24 @@
|
|||||||
bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
|
bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
|
||||||
e2fsprogs, expat, freetype, gawk, gvfs, haserl, hostapd,
|
e2fsprogs, expat, freetype, gawk, gvfs, haserl, hostapd,
|
||||||
ifplugd, iptables, jpeg, kexec, kismet, less, libcurl,
|
ifplugd, iptables, jpeg, kexec, kismet, less, libcurl,
|
||||||
libdnet, libevent, libglade, libgtk2, libiconv, libidn, libnl,
|
libdnet, libevent, libglade, libgtk2, libiconv, libidn,
|
||||||
liboil, libpcap, libpng, libungif, libxml2, libxslt, lighttpd,
|
libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
|
||||||
lite, m4, mdadm, metacity, mysql_client, nano, nbd, ncftp,
|
libxslt, lighttpd, lite, m4, mdadm, metacity, mysql_client,
|
||||||
neon, netperf, ntfsprogs, ntp, openntpd, openssh, openvpn,
|
nano, nbd, ncftp, neon, netperf, ntfsprogs, ntp, openntpd,
|
||||||
oprofile, pango, pcre, php, prboom, radvd, qt, samba, sdl_sound,
|
openssh, openvpn, oprofile, pango, pcre, php, prboom, radvd,
|
||||||
shared-mime-info, speex, sqlite, squashfs, strace, taglib,
|
qt, samba, sdl_sound, shared-mime-info, speex, sqlite,
|
||||||
tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
|
squashfs, strace, taglib, tcpdump, tiff, tn5250, udev,
|
||||||
which, xlib_libX11, zlib
|
udpcast, usbmount, usbutils, which, xlib_libX11, zlib
|
||||||
|
|
||||||
Deprecated packages: lzma
|
Deprecated packages: lzma
|
||||||
|
|
||||||
Removed packages: dillo, libglib12, libgtk12, microwin,
|
Removed packages: dillo, libglib12, libgtk12, microwin,
|
||||||
pcmcia
|
pcmcia
|
||||||
|
|
||||||
|
Issues resolved (http://bugs.uclibc.org):
|
||||||
|
|
||||||
|
#2581: libmms: Update to 0.6, and patch to work on architectures...
|
||||||
|
|
||||||
2010.08: Released August 31th, 2010:
|
2010.08: Released August 31th, 2010:
|
||||||
|
|
||||||
Fixes all over the tree.
|
Fixes all over the tree.
|
||||||
|
@ -0,0 +1,84 @@
|
|||||||
|
From 4fd16633a8c379971425f7fd482152f163b09158 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Burton <Paul.Burton@imgtec.com>
|
||||||
|
Date: Fri, 17 Sep 2010 14:08:57 +0100
|
||||||
|
Subject: [PATCH] Endianness macros should not dereference unaligned pointers
|
||||||
|
|
||||||
|
The LE_*/BE_* macros previously worked by casting the pointer passed to them to a pointer to the correct integer type, then dereferencing it. This will not work on architectures which don't allow unaligned data access. Instead, access one byte at a time and shift to form the value.
|
||||||
|
---
|
||||||
|
src/bswap.h | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
|
||||||
|
1 files changed, 43 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/bswap.h b/src/bswap.h
|
||||||
|
index b731da7..59e8716 100644
|
||||||
|
--- a/src/bswap.h
|
||||||
|
+++ b/src/bswap.h
|
||||||
|
@@ -21,23 +21,50 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
-/* Go cheap now, will rip out glib later. *Sigh* */
|
||||||
|
-#include <glib.h>
|
||||||
|
-
|
||||||
|
-/* NOTE:
|
||||||
|
- * Now, to clear up confusion: LE_XX means "from LE to native, XX bits wide"
|
||||||
|
- * I know it's not very clear naming (tell me about it, I
|
||||||
|
- * misinterpreted in first version and caused bad nasty bug, *sigh*),
|
||||||
|
- * but that's inherited code, will clean up as things go
|
||||||
|
- * Oh, and one more thing -- they take *pointers*, not actual ints
|
||||||
|
- */
|
||||||
|
+#include <stdint.h>
|
||||||
|
+
|
||||||
|
+#define SWAP_ENDIAN_16(val) \
|
||||||
|
+ (val[1] | (val[0] << 8))
|
||||||
|
+#define SWAP_ENDIAN_32(val) \
|
||||||
|
+ (val[3] | (val[2] << 8) | (val[1] << 16) | (val[0] << 24))
|
||||||
|
+#define SWAP_ENDIAN_64(val) \
|
||||||
|
+ (val[7] | (val[6] << 8) | (val[5] << 16) | (val[4] << 24) | \
|
||||||
|
+ ((uint64_t)val[3] << 32) | ((uint64_t)val[2] << 40) | \
|
||||||
|
+ ((uint64_t)val[1] << 48) | ((uint64_t)val[0] << 56))
|
||||||
|
+
|
||||||
|
+#define SAME_ENDIAN_16(val) \
|
||||||
|
+ (val[0] | (val[1] << 8))
|
||||||
|
+#define SAME_ENDIAN_32(val) \
|
||||||
|
+ (val[0] | (val[1] << 8) | (val[2] << 16) | (val[3] << 24))
|
||||||
|
+#define SAME_ENDIAN_64(val) \
|
||||||
|
+ (val[0] | (val[1] << 8) | (val[2] << 16) | (val[3] << 24) | \
|
||||||
|
+ ((uint64_t)val[4] << 32) | ((uint64_t)val[5] << 40) | \
|
||||||
|
+ ((uint64_t)val[6] << 48) | ((uint64_t)val[7] << 56))
|
||||||
|
+
|
||||||
|
+#ifndef WORDS_BIGENDIAN
|
||||||
|
+
|
||||||
|
+/* Little endian */
|
||||||
|
+
|
||||||
|
+#define LE_16(val) SAME_ENDIAN_16(((uint8_t *)(val)))
|
||||||
|
+#define LE_32(val) SAME_ENDIAN_32(((uint8_t *)(val)))
|
||||||
|
+#define LE_64(val) SAME_ENDIAN_64(((uint8_t *)(val)))
|
||||||
|
+#define BE_16(val) SWAP_ENDIAN_16(((uint8_t *)(val)))
|
||||||
|
+#define BE_32(val) SWAP_ENDIAN_32(((uint8_t *)(val)))
|
||||||
|
+#define BE_64(val) SWAP_ENDIAN_64(((uint8_t *)(val)))
|
||||||
|
+
|
||||||
|
+#elif WORDS_BIGENDIAN == 1
|
||||||
|
+
|
||||||
|
+/* Big endian */
|
||||||
|
|
||||||
|
-#define LE_16(val) (GINT16_FROM_LE (*((u_int16_t*)(val))))
|
||||||
|
-#define BE_16(val) (GINT16_FROM_BE (*((u_int16_t*)(val))))
|
||||||
|
-#define LE_32(val) (GINT32_FROM_LE (*((u_int32_t*)(val))))
|
||||||
|
-#define BE_32(val) (GINT32_FROM_BE (*((u_int32_t*)(val))))
|
||||||
|
+#define LE_16(val) SWAP_ENDIAN_16(((uint8_t *)(val)))
|
||||||
|
+#define LE_32(val) SWAP_ENDIAN_32(((uint8_t *)(val)))
|
||||||
|
+#define LE_64(val) SWAP_ENDIAN_64(((uint8_t *)(val)))
|
||||||
|
+#define BE_16(val) SAME_ENDIAN_16(((uint8_t *)(val)))
|
||||||
|
+#define BE_32(val) SAME_ENDIAN_32(((uint8_t *)(val)))
|
||||||
|
+#define BE_64(val) SAME_ENDIAN_64(((uint8_t *)(val)))
|
||||||
|
|
||||||
|
-#define LE_64(val) (GINT64_FROM_LE (*((u_int64_t*)(val))))
|
||||||
|
-#define BE_64(val) (GINT64_FROM_BE (*((u_int64_t*)(val))))
|
||||||
|
+#else
|
||||||
|
+#error Unknown endianness!
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#endif /* BSWAP_H_INCLUDED */
|
||||||
|
--
|
||||||
|
1.7.2.2
|
||||||
|
|
@ -3,9 +3,9 @@
|
|||||||
# libmms
|
# libmms
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
LIBMMS_VERSION = 0.4
|
LIBMMS_VERSION = 0.6
|
||||||
LIBMMS_SOURCE = libmms-$(LIBMMS_VERSION).tar.gz
|
LIBMMS_SOURCE = libmms-$(LIBMMS_VERSION).tar.gz
|
||||||
LIBMMS_SITE = http://launchpad.net/libmms/trunk/$(LIBMMS_VERSION)/+download
|
LIBMMS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libmms
|
||||||
|
|
||||||
LIBMMS_AUTORECONF = NO
|
LIBMMS_AUTORECONF = NO
|
||||||
LIBMMS_LIBTOOL_PATCH = NO
|
LIBMMS_LIBTOOL_PATCH = NO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user