mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
motion: fix segmentation fault under musl libc
During startup, motion calls pthread_getspecific() through motion_log() before pthread_key_create() has been called yet. This works on glibc and uclibc but segfaults on musl because motion is relying on undefined behaviour here. Move the pthread initialization before motion_startup() so that tls_key_threadnr is initialized when motion_log() is called. Also enforce the use of strerror_r() on musl by defining XSI_STRERROR_R on all non-glibc systems because the supposed replacement code is broken and crashes on musl. References: http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2015x09x30x203633 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2008-2011 OpenWrt.org
|
||||
# Copyright (C) 2008-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=motion
|
||||
PKG_VERSION=3.4.0-20141018-$(PKG_SOURCE_VERSION)
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
Reference in New Issue
Block a user