mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
Merge pull request #6727 from heitbaum/y2038proofness
Update 32-bit LibreELEC userland builds be Y2038 proof
This commit is contained in:
commit
f529cc98cb
@ -69,7 +69,8 @@
|
||||
fi
|
||||
|
||||
# setup ARCH specific *FLAGS
|
||||
TARGET_CFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated"
|
||||
TARGET_CFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"
|
||||
[ -n "$TARGET_FPU" ] && TARGET_CFLAGS="$TARGET_CFLAGS $TARGET_FPU_FLAGS"
|
||||
TARGET_LDFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU"
|
||||
TARGET_ARCH_GCC_OPTS="--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU"
|
||||
TARGET_CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"
|
||||
|
@ -5,4 +5,4 @@
|
||||
OS_VERSION="11.0"
|
||||
|
||||
# ADDON_VERSION: Addon version
|
||||
ADDON_VERSION="10.80.6"
|
||||
ADDON_VERSION="10.80.7"
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/test/evtest.c 2014-03-21 19:26:36.000000000 +0000
|
||||
+++ b/test/evtest.c 2022-07-20 12:35:25.235888860 +0000
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
for (i = 0; i < rd / (int) sizeof(struct input_event); i++)
|
||||
printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
|
||||
- ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
|
||||
+ ev[i].input_event_sec, ev[i].input_event_usec, ev[i].type,
|
||||
events[ev[i].type] ? events[ev[i].type] : "?",
|
||||
ev[i].code,
|
||||
names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
|
@ -0,0 +1,56 @@
|
||||
--- a/plugins/galax-raw.c 2022-07-21 15:46:14.666220340 +0000
|
||||
+++ b/plugins/galax-raw.c 2022-07-22 01:11:26.708402821 +0000
|
||||
@@ -198,7 +198,8 @@
|
||||
samp->x = i->current_x;
|
||||
samp->y = i->current_y;
|
||||
samp->pressure = i->current_p;
|
||||
- samp->tv = ev.time;
|
||||
+ samp->tv.tv_sec = ev.input_event_sec;
|
||||
+ samp->tv.tv_usec = ev.input_event_usec;
|
||||
samp++;
|
||||
total++;
|
||||
break;
|
||||
--- a/plugins/input-raw.c 2013-08-08 00:23:04.000000000 +0000
|
||||
+++ b/plugins/input-raw.c 2022-07-22 01:30:41.417546206 +0000
|
||||
@@ -179,7 +179,8 @@
|
||||
samp->y = i->current_y;
|
||||
samp->pressure = i->current_p;
|
||||
}
|
||||
- samp->tv = ev.time;
|
||||
+ samp->tv.tv_sec = ev.input_event_sec;
|
||||
+ samp->tv.tv_usec = ev.input_event_usec;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "RAW---------------------> %d %d %d %d.%d\n",
|
||||
samp->x, samp->y, samp->pressure, samp->tv.tv_sec,
|
||||
@@ -262,7 +263,8 @@
|
||||
samp->pressure = i->current_p = ev.value;
|
||||
break;
|
||||
}
|
||||
- samp->tv = ev.time;
|
||||
+ samp->tv.tv_sec = ev.input_event_sec;
|
||||
+ samp->tv.tv_usec = ev.input_event_usec;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "RAW---------------------------> %d %d %d\n",
|
||||
samp->x, samp->y, samp->pressure);
|
||||
@@ -278,7 +280,8 @@
|
||||
samp->x = 0;
|
||||
samp->y = 0;
|
||||
samp->pressure = 0;
|
||||
- samp->tv = ev.time;
|
||||
+ samp->tv.tv_sec = ev.input_event_sec;
|
||||
+ samp->tv.tv_usec = ev.input_event_usec;
|
||||
samp++;
|
||||
total++;
|
||||
}
|
||||
--- a/plugins/st1232-raw.c 2022-07-22 01:31:02.757483058 +0000
|
||||
+++ b/plugins/st1232-raw.c 2022-07-22 01:27:40.174757983 +0000
|
||||
@@ -162,7 +162,8 @@
|
||||
samp->x = i->current_x;
|
||||
samp->y = i->current_y;
|
||||
samp->pressure = i->current_p; /* is 0 on finger released */
|
||||
- samp->tv = ev.time;
|
||||
+ samp->tv.tv_sec = ev.input_event_sec;
|
||||
+ samp->tv.tv_usec = ev.input_event_usec;
|
||||
|
||||
i->current_p = 0; /* will be set again when getting xy cordinate */
|
||||
samp++;
|
@ -20,6 +20,16 @@ PKG_SECTION="service"
|
||||
PKG_ADDON_NAME="MariaDB SQL database server"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
pre_configure_target() {
|
||||
# mariadb does not need / nor build successfully with _FILE_OFFSET_BITS or _TIME_BITS set
|
||||
if [ "${TARGET_ARCH}" = "arm" ]; then
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
fi
|
||||
}
|
||||
|
||||
configure_package() {
|
||||
PKG_CMAKE_OPTS_HOST=" \
|
||||
-DCMAKE_INSTALL_MESSAGE=NEVER \
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- a/gzguts.h
|
||||
+++ b/gzguts.h
|
||||
@@ -9,6 +9,7 @@
|
||||
# endif
|
||||
# ifdef _FILE_OFFSET_BITS
|
||||
# undef _FILE_OFFSET_BITS
|
||||
+# undef _TIME_BITS
|
||||
# endif
|
||||
#endif
|
||||
|
@ -89,6 +89,14 @@ EOF
|
||||
|
||||
# binaries to install into target
|
||||
GLIBC_INCLUDE_BIN="getent ldd locale localedef"
|
||||
|
||||
# glibc does not need / nor build successfully with _FILE_OFFSET_BITS or _TIME_BITS set
|
||||
if [ "${TARGET_ARCH}" = "arm" ]; then
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
fi
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
|
@ -27,6 +27,14 @@ pre_configure_target() {
|
||||
PKG_MAKE_OPTS_TARGET+="-neon"
|
||||
fi
|
||||
fi
|
||||
|
||||
# libretro-fbneo does not need / nor build successfully with _FILE_OFFSET_BITS or _TIME_BITS set
|
||||
if [ "${TARGET_ARCH}" = "arm" ]; then
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_FILE_OFFSET_BITS=64||g")
|
||||
export CXXFLAGS=$(echo ${CXXFLAGS} | sed -e "s|-D_TIME_BITS=64||g")
|
||||
fi
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
|
@ -0,0 +1,23 @@
|
||||
--- a/src/input.c 2018-01-23 17:39:35.000000000 +0000
|
||||
+++ b/src/input.c 2022-07-19 13:44:12.924701772 +0000
|
||||
@@ -1100,8 +1100,8 @@
|
||||
if (device->repeat_filter == true)
|
||||
{
|
||||
if (evkey_type[device->current.event_out.code] == EVENTLIRCD_EVKEY_TYPE_KEY) {
|
||||
- time_delta = 1000000 * (device->current.event_out.time.tv_sec - previous->event_out.time.tv_sec ) +
|
||||
- (device->current.event_out.time.tv_usec - previous->event_out.time.tv_usec);
|
||||
+ time_delta = 1000000 * (device->current.event_out.input_event_sec - previous->event_out.input_event_sec ) +
|
||||
+ (device->current.event_out.input_event_usec - previous->event_out.input_event_usec);
|
||||
if (((previous->repeat_count == 0) && (time_delta < 900000)) ||
|
||||
((previous->repeat_count == 1) && (time_delta < 500000)) ||
|
||||
((previous->repeat_count == 2) && (time_delta < 300000)) ||
|
||||
@@ -1116,7 +1116,8 @@
|
||||
}
|
||||
}
|
||||
previous->repeat_count++;
|
||||
- previous->event_out.time = device->current.event_out.time;
|
||||
+ previous->event_out.input_event_sec = device->current.event_out.input_event_sec;
|
||||
+ previous->event_out.input_event_usec = device->current.event_out.input_event_usec;
|
||||
device->current.repeat_count = previous->repeat_count;
|
||||
break;
|
||||
/*
|
@ -0,0 +1,11 @@
|
||||
--- a/plugins/devinput.c 2017-09-10 08:52:19.000000000 +0000
|
||||
+++ b/plugins/devinput.c 2022-07-19 13:59:01.653286222 +0000
|
||||
@@ -459,7 +459,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
- log_trace("time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type,
|
||||
+ log_trace("time %ld.%06ld type %d code %d value %d", event.input_event_sec, event.input_event_usec, event.type,
|
||||
event.code, event.value);
|
||||
|
||||
value = (unsigned)event.value;
|
Loading…
x
Reference in New Issue
Block a user