mirror of
https://github.com/Motion-Project/motion.git
synced 2026-02-05 20:42:10 -05:00
freebsd motion build fixes. issue #267
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -350,7 +350,11 @@ WITHOUT_MMAL="no")
|
||||
|
||||
if test "${WITHOUT_MMAL}" = "no"; then
|
||||
HAVE_MMAL=""
|
||||
LIBRASPBERRYPIDEVPATH="/opt/vc/include/interface/mmal"
|
||||
if test "${FreeBSD}" != "" ; then
|
||||
LIBRASPBERRYPIDEVPATH="/usr/local/include/interface/mmal"
|
||||
else
|
||||
LIBRASPBERRYPIDEVPATH="/opt/vc/include/interface/mmal"
|
||||
fi
|
||||
|
||||
if test -d ${LIBRASPBERRYPIDEVPATH}; then
|
||||
HAVE_MMAL="yes"
|
||||
@@ -362,7 +366,10 @@ if test "${WITHOUT_MMAL}" = "no"; then
|
||||
AC_SUBST(MMAL_LIBS)
|
||||
MMAL_OBJ="mmalcam.o raspicam/RaspiCamControl.o raspicam/RaspiCLI.o"
|
||||
MMAL_CFLAGS="-std=gnu99 -DHAVE_MMAL -Irasppicam -I/opt/vc/include"
|
||||
MMAL_LIBS="-L/opt/vc/lib -lmmal_core -lmmal_util -lmmal_vc_client -lvcos -lvchostif -lvchiq_arm"
|
||||
AS_IF([test "${FreeBSD}" != "" ], [
|
||||
MMAL_CFLAGS="${MMAL_CFLAGS} -I/usr/local/include -I/usr/local/include/interface/vcos -I/usr/local/include/interface/vcos/pthreads/ -I/usr/local/include/interface/vmcs_host/linux"
|
||||
])
|
||||
MMAL_LIBS="-L/opt/vc/lib -lmmal_core -lmmal_util -lmmal_vc_client -lvcos -lvchostif -lvchiq_arm"
|
||||
AC_DEFINE([HAVE_MMAL], 1, [Define to 1 if we want MMAL])
|
||||
])
|
||||
fi
|
||||
|
||||
2
logger.c
2
logger.c
@@ -192,7 +192,9 @@ void motion_log(int level, unsigned int type, int errno_flag, const char *fmt, .
|
||||
errno_save = errno;
|
||||
|
||||
char threadname[32] = "unknown";
|
||||
#if (!defined(__FreeBSD__))
|
||||
pthread_getname_np(pthread_self(), threadname, sizeof(threadname));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prefix the message with the log level string, log type string,
|
||||
|
||||
@@ -462,9 +462,13 @@ static int netcam_rtsp_open_context(netcam_context_ptr netcam){
|
||||
* our thread name - so temporarily change our thread name to the
|
||||
* desired name */
|
||||
{
|
||||
char curtname[16];
|
||||
char newtname[16];
|
||||
#if defined(__FreeBSD__)
|
||||
char curtname[16] = "unknown";
|
||||
#else
|
||||
char curtname[16];
|
||||
pthread_getname_np(pthread_self(), curtname, sizeof(curtname));
|
||||
#endif
|
||||
snprintf(newtname, sizeof(newtname), "av%d%s%s",
|
||||
netcam->cnt->threadnr,
|
||||
netcam->cnt->conf.camera_name ? ":" : "",
|
||||
|
||||
Reference in New Issue
Block a user