Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ int __fgetc_unlocked(FILE *stream) { return fgetc(stream); }
double __log_finite(double x) { return log(x); }

#if defined(__arm__) || defined(__aarch64__) || defined(__mips__)
/* The 32-bit offset suits vendor libraries; V4L2 builds link none, and
* their libraries (ALSA) pass the libc off_t. */
#ifndef DIVINUS_V4L2
void *mmap(void *start, size_t len, int prot, int flags, int fd, uint32_t off) {
return (void*)syscall(SYS_mmap2, start, len, prot, flags, fd, off >> 12);
}
#endif

void *__mmap64(void *start, size_t len, int prot, int flags, int fd, off_t off) {
return (void*)syscall(SYS_mmap2, start, len, prot, flags, fd, (long)(off >> 12));
Expand Down
1 change: 1 addition & 0 deletions src/hal/support.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ unsigned long long lastMillisTemp = 0;
float lastReadTemp = 0.0 / 0.0;

void hal_identify(void) {
if (v4l2_system_identify()) return;
#if defined(__ARM_PCS_VFP)
if (i6_system_identify()) return;
if (i6c_system_identify()) return;
Expand Down
1 change: 1 addition & 0 deletions src/hal/support.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "types.h"
#include "globals.h"
#include "tools.h"
#include "v4l2_hal.h"

#include <linux/version.h>
#include <stdbool.h>
Expand Down
3 changes: 2 additions & 1 deletion src/hal/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ typedef enum {
HAL_PLATFORM_V1,
HAL_PLATFORM_V2,
HAL_PLATFORM_V3,
HAL_PLATFORM_V4
HAL_PLATFORM_V4,
HAL_PLATFORM_V4L2
} hal_platform;

typedef enum {
Expand Down
Loading