Upstream FreeBSD patches (#1926)
* apply FreeBSD patches * timeval struct needs time.h * typo * added forgotten destination for systemd startup script install
This commit is contained in:
parent
1bba664e3d
commit
950c8f19d3
|
@ -33,8 +33,11 @@ FOREACH(PERLSCRIPT ${perlscripts})
|
|||
ENDFOREACH(PERLSCRIPT ${perlscripts})
|
||||
|
||||
# Install the perl scripts
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
if(NOT ZM_NO_X10)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif(NOT ZM_NO_X10)
|
||||
|
||||
if(WITH_SYSTEMD)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif(WITH_SYSTEMD)
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
/* Workaround for GNU/kFreeBSD */
|
||||
#if defined(__FreeBSD_kernel__)
|
||||
/* Workaround for GNU/kFreeBSD and FreeBSD */
|
||||
#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
|
||||
#ifndef ENODATA
|
||||
#define ENODATA ENOATTR
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,10 @@ extern "C" {
|
|||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/time.h>
|
||||
#endif // __FreeBSD__
|
||||
|
||||
class ZMPacket {
|
||||
public:
|
||||
|
||||
|
|
|
@ -63,13 +63,13 @@ RETSIGTYPE zm_die_handler(int signal)
|
|||
ucontext_t *uc = (ucontext_t *) context;
|
||||
cr2 = info->si_addr;
|
||||
#if defined(__x86_64__)
|
||||
#ifdef __FreeBSD_kernel__
|
||||
#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
|
||||
ip = (void *)(uc->uc_mcontext.mc_rip);
|
||||
#else
|
||||
ip = (void *)(uc->uc_mcontext.gregs[REG_RIP]);
|
||||
#endif
|
||||
#else
|
||||
#ifdef __FreeBSD_kernel__
|
||||
#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
|
||||
ip = (void *)(uc->uc_mcontext.mc_eip);
|
||||
#else
|
||||
ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]);
|
||||
|
|
Loading…
Reference in New Issue