Update irtrans
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
AUX client_sleep.patch 1257 BLAKE2B eacf2dad1b2921998c1cc855684067b5f2899b63a4ccf67685bdcdaf033ac3e3769d3063cd4f35cc18026bb7c0c12ad78627a4e10275a4a89ca050752aa7e08a SHA512 e2621475564e35c15249e67e6ade422f909349e540ba0e8255540167e1630e655023edf79fd419ceb740b0555ce9fe2cafd7dc0d2586ec602fb4ea64d19dd6c6
|
||||
AUX client_warnings.patch 10028 BLAKE2B 7a96ab554ff4356818b7a6e2b1566d8f0af55162f622b0d72ff460c0c3a2cfc3a3775a4920e5017fc589b79fc49d8767b3b280de2db1b613dfe69863ffbfa66c SHA512 fa9267f2549c22155a9191ab747d7ebe116c4979160d23a420a89f7ca8f7ad63e883f7d2fa0b7bc15037dfe8f7e217cbeff5496224593e1588403350eca1ebcb
|
||||
AUX irtrans-irclient-6.01.16-ethernet.patch 1842 BLAKE2B 708dedaf5c6b169d1483cff40abf0135b1ad0125805c82492e2e41552e6699974f345d52c48e5383b462460fa693b48a766433554963d220ac9f8cdffc6421b9 SHA512 bd11ab17b94d5111d657e97a1d37737e759ef6f579b66ed1a1b5a10394ed451ebd88ea2af82453d266713278d99364921c09823c4e334f2aa53075bf4d0de9ba
|
||||
AUX irtrans-irclient-6.01.16-makefile.patch 261 BLAKE2B 284582aea4ac59794eea70e2ceab2804082a0c249da8641da135bb757244b6ebbe854ecad28735a7f9a61d3d672c653432e8d5d2d66eda227e90e3cd03834e08 SHA512 c6bbbe754b59528a727daf4b5b50087c4cc3546287e57b2d4f59e17355f0010ebab59ceae5905daabac3b7c662cd25bf6a7c4132b54a447fe65cb419819e28e6
|
||||
AUX irtrans-irclient-6.01.16-sleep.patch 1257 BLAKE2B eacf2dad1b2921998c1cc855684067b5f2899b63a4ccf67685bdcdaf033ac3e3769d3063cd4f35cc18026bb7c0c12ad78627a4e10275a4a89ca050752aa7e08a SHA512 e2621475564e35c15249e67e6ade422f909349e540ba0e8255540167e1630e655023edf79fd419ceb740b0555ce9fe2cafd7dc0d2586ec602fb4ea64d19dd6c6
|
||||
AUX irtrans-irclient-6.01.16-warnings.patch 10028 BLAKE2B 7a96ab554ff4356818b7a6e2b1566d8f0af55162f622b0d72ff460c0c3a2cfc3a3775a4920e5017fc589b79fc49d8767b3b280de2db1b613dfe69863ffbfa66c SHA512 fa9267f2549c22155a9191ab747d7ebe116c4979160d23a420a89f7ca8f7ad63e883f7d2fa0b7bc15037dfe8f7e217cbeff5496224593e1588403350eca1ebcb
|
||||
DIST irclient-src-6.01.16.tar.gz 153254 BLAKE2B ec4880699ff3bef0419f52b2df381e2f0f1b1202f3358648486400540fe420f0012cb78e38ac429791ea39d40e9b59a63ede9b7777957c69c2c30f1512468035 SHA512 904451e03e9a508aa78954a9dd8d34462b5c47937ea127f1ff1ec52f07f645f60861f055347dba178b9c37455a5d749d987144f3be882bcb24e479f02643eaea
|
||||
DIST irtrans-irclient-5.11.04-ip_assign-1.patch.bz2 5051 BLAKE2B 79b8fb9249c69e8a868771a288e5f0e7c4d6658d36f97ce1ac0c577dae5c810207780406bb7a87df3392eb795463b9c62c6ce7d99ef349111db99637ee8d2432 SHA512 9be72f7f6fcc24c9bda73cf5dd8a2c112c6cb82e2ef50d40c17b43d7dcb8f11bcf8bc0ebb914046b5429bce1b4936278ade936db6c916384fbd637a300f528cf
|
||||
EBUILD irtrans-irclient-6.01.16.ebuild 1471 BLAKE2B c352b18fb23e0e8da9737b4a82d4ea9325c5238dfdb098ec5017731adfa574121d8f246962eb449ca5e37045d9d4d1e1ca4c24d049e6d2aea5171a3045f65929 SHA512 64b4bba32891b8ddd491c28462b30de5724c61e6624e7c44f82f68f435026ea3c13c0b211a831fe66b6c5173c582188fa1631e14051640dd13b5ea6d563e004d
|
||||
EBUILD irtrans-irclient-6.01.16.ebuild 1426 BLAKE2B 1b929ea46b3e5368618a1f9d7295663e8152e048e06c56e6939a6b5e3ee84836cad074209f9bf2c3a7fd7b4f232ea88bfd125207f57558b63ecaec72c8095b89 SHA512 2bcd48447e229365aa7c62876472010642bf96a3aa59f711397cccd4a0bdd5ab6dd3125903f9230886797f8613882cdcfd2493a8a0db207a7ec46f509d43deff
|
||||
MISC ChangeLog 3910 BLAKE2B 0949a89d568c6b2a49a6e7c279f5034ed97a7b146b84abbd82acc9c3c27d3331c9c7d2583bfe1de1df0e892d21a1978958a3c96203ed7285820203184ba284a8 SHA512 768fffb886d2f69154da005675e4741880de4a33fc58364f7b10fa89bf2360930c641d672db261a7b9916b02e2c8bef297ff6c0c3d28908f57ef0a5a70b55a3e
|
||||
MISC metadata.xml 408 BLAKE2B 66a3e2838d5c5f95c7463733cd13b1230ef3ca005ec0c5dac797561be30f950da98dfa41eeb4d43cf97500c9a2e0d04c57b0b084d60107072a988dd7c4d16ded SHA512 9cac3e4a07c425e87274de776e03d243e462341168235cd3991ef4706aa1a902cf6591ae8e965b9c4ed370fc2ebef3ca805a9c761d05c4b994ae8667198b267c
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
diff '--color=auto' -uNr work.orig/ip_assign.c work/ip_assign.c
|
||||
--- work.orig/ip_assign.c 2026-04-07 21:30:05.374732873 +0200
|
||||
+++ work/ip_assign.c 2026-04-07 21:36:29.609991318 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
+#include <ifaddrs.h>
|
||||
|
||||
|
||||
typedef int SOCKET;
|
||||
@@ -249,39 +250,29 @@
|
||||
#ifndef WIN32
|
||||
int GetInterfaces (uint ips[])
|
||||
{
|
||||
- int i,j,cnt;
|
||||
- FILE *fp;
|
||||
- char *pnt,ln[256];
|
||||
+ struct ifaddrs *ifaddr, *ifa;
|
||||
struct sockaddr_in *sinp;
|
||||
- struct ifreq ifr;
|
||||
- int s; /* Socket */
|
||||
- char local_ip_addr[16];
|
||||
-
|
||||
- fp = fopen ("/proc/net/dev","r");
|
||||
- if (!fp) return (0);
|
||||
- s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
-
|
||||
- cnt = 0;
|
||||
- pnt = fgets (ln,sizeof (ln),fp);
|
||||
- while (pnt) {
|
||||
- i = 0;
|
||||
- while (ln[i] == ' ') i++;
|
||||
- if (!memcmp (ln+i,"eth",3)) {
|
||||
- j = i;
|
||||
- while ((ln[j] >= '0' && ln[j] <= '9') || (ln[j] >= 'a' && ln[j] <= 'z') || (ln[j] >= 'A' && ln[j] <= 'Z')) j++;
|
||||
- ln[j] = 0;
|
||||
- memset (&ifr,0,sizeof (ifr));
|
||||
- strcpy(ifr.ifr_name, ln+i);
|
||||
- ioctl(s, SIOCGIFADDR, &ifr);
|
||||
- sinp = (struct sockaddr_in*)&ifr.ifr_addr;
|
||||
- ips[cnt++] = sinp->sin_addr.s_addr;
|
||||
+ int cnt = 0;
|
||||
+ int i;
|
||||
+
|
||||
+ if (getifaddrs(&ifaddr) == -1) return (0);
|
||||
+
|
||||
+ for (ifa = ifaddr; ifa != NULL && cnt < 32; ifa = ifa->ifa_next) {
|
||||
+ if (!ifa->ifa_addr) continue;
|
||||
+ if (ifa->ifa_addr->sa_family != AF_INET) continue;
|
||||
+ if (!(ifa->ifa_flags & IFF_UP)) continue;
|
||||
+ if (ifa->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) continue;
|
||||
+
|
||||
+ sinp = (struct sockaddr_in *)ifa->ifa_addr;
|
||||
+
|
||||
+ /* avoid duplicates when an address appears multiple times */
|
||||
+ for (i = 0; i < cnt; i++) {
|
||||
+ if (ips[i] == sinp->sin_addr.s_addr) break;
|
||||
}
|
||||
- pnt = fgets (ln,sizeof (ln),fp);
|
||||
+ if (i == cnt) ips[cnt++] = sinp->sin_addr.s_addr;
|
||||
}
|
||||
|
||||
- close (s);
|
||||
- fclose (fp);
|
||||
-
|
||||
+ freeifaddrs(ifaddr);
|
||||
return (cnt);
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
diff '--color=auto' -uNr work.orig/makefile work/makefile
|
||||
--- work.orig/makefile 2026-04-07 21:17:34.025222315 +0200
|
||||
+++ work/makefile 2026-04-07 21:17:45.406810712 +0200
|
||||
@@ -1,7 +1,5 @@
|
||||
SHELL = /bin/sh
|
||||
|
||||
-CC = gcc
|
||||
-
|
||||
CFLAGS =
|
||||
CPPFLAGS = -DLINUX
|
||||
LDFLAGS =
|
||||
@@ -19,7 +19,13 @@ KEYWORDS="~amd64 ~arm ~x86"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
PATCHES=( "${WORKDIR}/${PN}"-5.11.04-ip_assign-1.patch "${FILESDIR}"/client_sleep.patch "${FILESDIR}"/client_warnings.patch )
|
||||
PATCHES=(
|
||||
"${WORKDIR}/${PN}"-5.11.04-ip_assign-1.patch
|
||||
"${FILESDIR}"/${P}-sleep.patch
|
||||
"${FILESDIR}"/${P}-warnings.patch
|
||||
"${FILESDIR}"/${P}-makefile.patch
|
||||
"${FILESDIR}"/${P}-ethernet.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
append-cppflags -DLINUX
|
||||
@@ -46,10 +52,7 @@ src_compile() {
|
||||
|
||||
emake CXX="$(tc-getCXX)" CC="$(tc-getCC)" \
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
||||
"${irbuild}"
|
||||
emake CXX="$(tc-getCXX)" CC="$(tc-getCC)" \
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
||||
"${ipbuild}"
|
||||
"${irbuild}" "${ipbuild}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
AUX gcc15.patch 11074 BLAKE2B e9b425dcbdd4b6e8c9b03f2c5238fd6a87b6fe4f49b349cad413b8feb0e644afa49a8007d7cf2ff5f25669ecbffd008c22d7eeeecab8ab97fda37d7de3f85758 SHA512 7c4de90a1f25c16303b0885c32ff05092c311890a4cacfa71574ee7e5007d9bde9006928958ce755b59d0574ff5e94ede4b558f4479faca9fdca81df6ba8348a
|
||||
AUX irtrans-irserver-6.10.23-ethernet.patch 1821 BLAKE2B 094effd6902a362dab35c783c6e1793828e7939937ea3c888c9c3d4e46e9d984f814e9cab41c7f00269e88b99209a4bfe5c0a188e4838fa2473f17a9ed5a2980 SHA512 8b2c668a1541f345a1522efc7659fcf67600d61172b0b034bb11eee79cd25e3c646873d587b56c9b2d765ed1993bb8c6b938b75b4cc5adf820e983e183dce54a
|
||||
AUX irtrans-irserver-6.10.23-gcc15.patch 9485 BLAKE2B f12c6d045a910cf1cbc8bf9ffafaf864c69dd0b250a37226832c2f99b289c9703b8c2f3bede99a07fb3463ed7e8a01f8fe413e09c771f2fa2f6eff5e7dbe7c8d SHA512 8fe70055403497ec2cce88a6d1f8802d84e6fd0d74a9add5cf257948131fbc74c50a3902174421f4c82c20814b5aa85c641b65a12931bb9e08441ee2bc04f903
|
||||
AUX irtrans-irserver-6.10.23-makefile.patch 241 BLAKE2B cc2022403d692036e777012dc32b650dab2675c8c0cc19c031ee8b3d31180163098f263938df2977dbd58a6cdb5cadf3bf38510144d349045c0f30663ee83302 SHA512 dee3d35af50412447613c2765b89367a93989f8a21af6a9fa83ee25a98611e92c29996d2395892754c907de5be6735134c68d5930a6717162a5c4b92e4b4eb24
|
||||
AUX irtrans-irserver-6.10.23-musl.patch 12516 BLAKE2B 55cc7ea8865199b61dd09d8735c25a7beb134cbcc60ee98725d334b0cab385627dfdbaa3df7e3727e5c898b7948344abe528cb901dc82f779f7cd349f8ada316 SHA512 14d3d66bc8ba19b0dd2ec584b8329c1c289a9c3ccff19804a957194eab5e2d0a777b06f4aa121f54017011c67c5cb4dc8d63d39f83f60e58de84aa153b6663a5
|
||||
AUX irtrans-irserver-6.10.23-warnings.patch 10500 BLAKE2B 629de12e01f80379ed5fc957002a336e9338f0a677290b4aa04e6238c4f7e0866fdcb1f307cea32dcd367271c1245c913d94377864385da72238a08bc61c73c0 SHA512 d49edcfb40eef3e72f9c2fb8e55311dfcd9865691631420e2801078ee6119694e0ed0fa204b24809f18d68dd60ffd947efa94295c925afbc0eb7a249bc9d1793
|
||||
AUX irtrans-server.confd 405 BLAKE2B fa94ea017cb77fbde5e3d06b9b4db0a8ab718603657be9c847049bd51b84356e4f32cf737cceb882fc002193e4163bf75c8dabb0f7e81d80934ea41a0d9f1fdb SHA512 1de71558faf723b6f2b8b133f81d20addc7c0775e3859307a78e1ae41bd9fb122ccc43f483d7e9e33cb21de611e283246562e1a8d1cd3d6cfd9d1a3002b8593b
|
||||
AUX irtrans-server.initd 577 BLAKE2B 3b1507c90cc241016eabde61566bcae96302c452a880f30089a086b50a6e1ff9007b915eb0523c0ff896fb692a2a459fc3b780a4ae50c912cb8d4bf780f06e7d SHA512 174d17d5d8dc5f2b7d39eabfd1e3ee5d72d9fc1130ea7f538e395d1401aaebcc4ff18582f6ec9a1baba11ff70308bcff3aa2bf31075bc0f20762639f8794008a
|
||||
AUX irtrans-server.service 416 BLAKE2B ffc0ba6b32904c6de2d14310aeb5437388acdfd89516ce0b6a9154c22632aba97ec8f5d1685fc032b7608632224bdc25c6546abfa24034de25840e551bf50666 SHA512 a6583c757b21db03aa252ef371ffb8821c8ab62fe50a2f941fe3dc4f9e4cfcf068cb0870e1f5b995af65c53d6e8192020228c7eb624e19fb2d85e13870fbed0b
|
||||
AUX server-warnings.patch 10500 BLAKE2B 629de12e01f80379ed5fc957002a336e9338f0a677290b4aa04e6238c4f7e0866fdcb1f307cea32dcd367271c1245c913d94377864385da72238a08bc61c73c0 SHA512 d49edcfb40eef3e72f9c2fb8e55311dfcd9865691631420e2801078ee6119694e0ed0fa204b24809f18d68dd60ffd947efa94295c925afbc0eb7a249bc9d1793
|
||||
DIST irserver-6.10.23.tar.gz 864840 BLAKE2B a046fc394f6a39b261d448f0e67816f5cacd8bbe6b075650e50318bb5042b29d7972c14eac0923d36afaafd000c32682e8b68be238b57fd5cc1f4e4c22205651 SHA512 81934293ffb7e5d34ff04276612f9e7fe20b4fc401a63cda64da360fb8a7c48f94a57631c1c19d2fd7e75d2e1e3fe34c08319a743d444a38febf1fb4f9c0767d
|
||||
DIST irserver-src-6.10.23.tar.gz 532755 BLAKE2B 6550ecacf007fe4a69c523c181feb1a96e3309c86d9d2040af05bd02d00391c3c37e7ef4c9f829db37b97dc590c88baf746544a5996e44b4fdc8088ea2ea9589 SHA512 ef453381ae4802a40a76c27a685c6892d1d0f6a88ef2975868e901eb06b5e70ba6e6f40333c4ea45a83f2b4419a49b9b16d08f23f303e1911d856f8b6afc2d85
|
||||
EBUILD irtrans-irserver-6.10.23.ebuild 2067 BLAKE2B 5dad194cb53dd02ff332e8d7469d7e7765258b665cbbda67e3dedbf2707e4ed31d476663697e7cbcc2c4d078016e07d5ecbc8940db20c0784c6308fe152425f0 SHA512 8d2585685de16dbb8d9f47ad4e9fc52771a5679e1da94aa47b4dea1aa4955a6e73c47110451b6f66ac6d55e431e56fc449950201ec96dbc5f56ffb40f361dc23
|
||||
EBUILD irtrans-irserver-6.10.23.ebuild 2094 BLAKE2B a806d1e006682aa6c1b0200ed3df12b6fea237052bcdbdd30a929e5312a03b49473afa67e8516b14ae937ec497015336d93432bbe4c456bf598ec991b773888b SHA512 ef4d1a84c7c4009abd56b50c0935e9b0120456decc4b09af59d1d86c04c384b9ef178a3c42823238d6388ecda28779c17bc669cdbda9789262e25c2d5330764c
|
||||
MISC ChangeLog 6002 BLAKE2B f828d1c5a823915aa4779055c15b98795d726daf353e6594a8038b1654ce4e06096f7884e77703e7bc0097f02311ccfec27d2526405f8e3e13aa4b5dd088160d SHA512 9fc36a1b10d95a7594332861ee0fd2dd230ba919a7fefa4abc3ab7076af60e4b501ec19b92eabe9e1f89ad5283859893450bc9759ecc81469b67e067fc3ac644
|
||||
MISC metadata.xml 408 BLAKE2B 66a3e2838d5c5f95c7463733cd13b1230ef3ca005ec0c5dac797561be30f950da98dfa41eeb4d43cf97500c9a2e0d04c57b0b084d60107072a988dd7c4d16ded SHA512 9cac3e4a07c425e87274de776e03d243e462341168235cd3991ef4706aa1a902cf6591ae8e965b9c4ed370fc2ebef3ca805a9c761d05c4b994ae8667198b267c
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
diff '--color=auto' -uNr work.orig/lanio.c work/lanio.c
|
||||
--- work.orig/lanio.c 2026-04-07 21:42:06.177575795 +0200
|
||||
+++ work/lanio.c 2026-04-07 21:44:23.040535064 +0200
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
+#include <ifaddrs.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
@@ -671,39 +672,29 @@
|
||||
|
||||
int GetInterfaces (unsigned int ips[])
|
||||
{
|
||||
- int i,j,cnt;
|
||||
- FILE *fp;
|
||||
- char *pnt,ln[256];
|
||||
+ struct ifaddrs *ifaddr, *ifa;
|
||||
struct sockaddr_in *sinp;
|
||||
- struct ifreq ifr;
|
||||
- int s; /* Socket */
|
||||
- char local_ip_addr[16];
|
||||
-
|
||||
- fp = fopen ("/proc/net/dev","r");
|
||||
- if (!fp) return (0);
|
||||
- s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ int cnt = 0;
|
||||
+ int i;
|
||||
|
||||
- cnt = 0;
|
||||
- pnt = fgets (ln,sizeof (ln),fp);
|
||||
- while (pnt) {
|
||||
- i = 0;
|
||||
- while (ln[i] == ' ') i++;
|
||||
- if (!memcmp (ln+i,"eth",3) || !memcmp (ln+i,"wlan",4)) {
|
||||
- j = i;
|
||||
- while ((ln[j] >= '0' && ln[j] <= '9') || (ln[j] >= 'a' && ln[j] <= 'z') || (ln[j] >= 'A' && ln[j] <= 'Z')) j++;
|
||||
- ln[j] = 0;
|
||||
- memset (&ifr,0,sizeof (ifr));
|
||||
- strcpy(ifr.ifr_name, ln+i);
|
||||
- ioctl(s, SIOCGIFADDR, &ifr);
|
||||
- sinp = (struct sockaddr_in*)&ifr.ifr_addr;
|
||||
- ips[cnt++] = sinp->sin_addr.s_addr;
|
||||
+ if (getifaddrs(&ifaddr) == -1) return (0);
|
||||
+
|
||||
+ for (ifa = ifaddr; ifa != NULL && cnt < 32; ifa = ifa->ifa_next) {
|
||||
+ if (!ifa->ifa_addr) continue;
|
||||
+ if (ifa->ifa_addr->sa_family != AF_INET) continue;
|
||||
+ if (!(ifa->ifa_flags & IFF_UP)) continue;
|
||||
+ if (ifa->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) continue;
|
||||
+
|
||||
+ sinp = (struct sockaddr_in *)ifa->ifa_addr;
|
||||
+
|
||||
+ /* avoid duplicates */
|
||||
+ for (i = 0; i < cnt; i++) {
|
||||
+ if (ips[i] == sinp->sin_addr.s_addr) break;
|
||||
}
|
||||
- pnt = fgets (ln,sizeof (ln),fp);
|
||||
+ if (i == cnt) ips[cnt++] = sinp->sin_addr.s_addr;
|
||||
}
|
||||
|
||||
- close (s);
|
||||
- fclose (fp);
|
||||
-
|
||||
+ freeifaddrs(ifaddr);
|
||||
return (cnt);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
diff '--color=auto' -uNr work.orig/ascii.c work/ascii.c
|
||||
--- work.orig/ascii.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/ascii.c 2026-04-06 12:31:57.709799694 +0200
|
||||
Mario Fetka (geos_one) https://bugs.gentoo.org/700180#c6
|
||||
irtrans-irserver-6.10.23 gcc 15 patch that shcoudl fix many erros in the build.
|
||||
also with this patch its now a non static build again.
|
||||
https://bugs.gentoo.org/700180
|
||||
--- a/ascii.c
|
||||
+++ b/ascii.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
@@ -9,9 +12,8 @@ diff '--color=auto' -uNr work.orig/ascii.c work/ascii.c
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/fileio.c work/fileio.c
|
||||
--- work.orig/fileio.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/fileio.c 2026-04-06 12:31:57.710099792 +0200
|
||||
--- a/fileio.c
|
||||
+++ b/fileio.c
|
||||
@@ -61,6 +61,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
@@ -43,9 +45,8 @@ diff '--color=auto' -uNr work.orig/fileio.c work/fileio.c
|
||||
}
|
||||
|
||||
int DBFindCommandName (byte *command,char remote[],char name[],byte address,int *remote_num,int *command_num,word *command_num_rel,int start)
|
||||
diff '--color=auto' -uNr work.orig/firmware.c work/firmware.c
|
||||
--- work.orig/firmware.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/firmware.c 2026-04-06 12:31:57.710415121 +0200
|
||||
--- a/firmware.c
|
||||
+++ b/firmware.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
@@ -72,9 +73,8 @@ diff '--color=auto' -uNr work.orig/firmware.c work/firmware.c
|
||||
{
|
||||
int res,i;
|
||||
IRDATA ir;
|
||||
diff '--color=auto' -uNr work.orig/flashrom.c work/flashrom.c
|
||||
--- work.orig/flashrom.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/flashrom.c 2026-04-06 12:31:57.710684730 +0200
|
||||
--- a/flashrom.c
|
||||
+++ b/flashrom.c
|
||||
@@ -58,6 +58,10 @@
|
||||
#include "lowlevel.h"
|
||||
#include "global.h"
|
||||
@@ -114,9 +114,8 @@ diff '--color=auto' -uNr work.orig/flashrom.c work/flashrom.c
|
||||
return (-ERR_TIMEOUT);
|
||||
}
|
||||
|
||||
diff '--color=auto' -uNr work.orig/lanio.c work/lanio.c
|
||||
--- work.orig/lanio.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/lanio.c 2026-04-06 12:31:57.710884447 +0200
|
||||
--- a/lanio.c
|
||||
+++ b/lanio.c
|
||||
@@ -60,6 +60,8 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
@@ -126,9 +125,8 @@ diff '--color=auto' -uNr work.orig/lanio.c work/lanio.c
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/linuxserio.c work/linuxserio.c
|
||||
--- work.orig/linuxserio.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/linuxserio.c 2026-04-06 12:31:57.711026712 +0200
|
||||
--- a/linuxserio.c
|
||||
+++ b/linuxserio.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <termios.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -137,9 +135,8 @@ diff '--color=auto' -uNr work.orig/linuxserio.c work/linuxserio.c
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
diff '--color=auto' -uNr work.orig/lowlevel.c work/lowlevel.c
|
||||
--- work.orig/lowlevel.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/lowlevel.c 2026-04-06 12:35:42.774136078 +0200
|
||||
--- a/lowlevel.c
|
||||
+++ b/lowlevel.c
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
@@ -217,9 +214,8 @@ diff '--color=auto' -uNr work.orig/lowlevel.c work/lowlevel.c
|
||||
}
|
||||
|
||||
IRDevices[bus].my_addr = sb->my_adress;
|
||||
diff '--color=auto' -uNr work.orig/serio.h work/serio.h
|
||||
--- work.orig/serio.h 2026-04-06 11:49:22.774033548 +0200
|
||||
+++ work/serio.h 2026-04-06 12:36:13.905311309 +0200
|
||||
--- a/serio.h
|
||||
+++ b/serio.h
|
||||
@@ -36,5 +36,7 @@
|
||||
|
||||
int OpenSerialPortEx (char Pname[],HANDLE *port,int wait);
|
||||
@@ -228,9 +224,8 @@ diff '--color=auto' -uNr work.orig/serio.h work/serio.h
|
||||
+int ReadSerialStringEx_ITo (DEVICEINFO *dev,byte pnt[],int len,int timeout);
|
||||
void SetSerialTimeoutEx (DEVICEINFO *dev,int time);
|
||||
void SetSerialTimeoutEx_ITo (DEVICEINFO *dev,int time);
|
||||
diff '--color=auto' -uNr work.orig/server.c work/server.c
|
||||
--- work.orig/server.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/server.c 2026-04-06 12:31:57.711758734 +0200
|
||||
--- a/server.c
|
||||
+++ b/server.c
|
||||
@@ -76,6 +76,7 @@
|
||||
#include <netdb.h>
|
||||
#include <stdint.h>
|
||||
@@ -269,9 +264,8 @@ diff '--color=auto' -uNr work.orig/server.c work/server.c
|
||||
{
|
||||
int res;
|
||||
char *pnt;
|
||||
diff '--color=auto' -uNr work.orig/webserver.c work/webserver.c
|
||||
--- work.orig/webserver.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/webserver.c 2026-04-06 12:31:57.712090318 +0200
|
||||
--- a/webserver.c
|
||||
+++ b/webserver.c
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
@@ -280,19 +274,18 @@ diff '--color=auto' -uNr work.orig/webserver.c work/webserver.c
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
Binärdateien work.orig/x64/ascii.o und work/x64/ascii.o sind verschieden.
|
||||
Binärdateien work.orig/x64/fileio.o und work/x64/fileio.o sind verschieden.
|
||||
Binärdateien work.orig/x64/firmware.o und work/x64/firmware.o sind verschieden.
|
||||
Binärdateien work.orig/x64/flashrom.o und work/x64/flashrom.o sind verschieden.
|
||||
Binärdateien work.orig/x64/lanio.o und work/x64/lanio.o sind verschieden.
|
||||
Binärdateien work.orig/x64/linuxserio.o und work/x64/linuxserio.o sind verschieden.
|
||||
Binärdateien work.orig/x64/server.o und work/x64/server.o sind verschieden.
|
||||
Binärdateien work.orig/x64/webserver.o und work/x64/webserver.o sind verschieden.
|
||||
Binärdateien work.orig/x64/xap.o und work/x64/xap.o sind verschieden.
|
||||
Binärdateien work.orig/x64/xbmc.o und work/x64/xbmc.o sind verschieden.
|
||||
diff '--color=auto' -uNr work.orig/xap.c work/xap.c
|
||||
--- work.orig/xap.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/xap.c 2026-04-06 12:31:57.712240467 +0200
|
||||
Binärdateien a/x64/ascii.o und b/x64/ascii.o sind verschieden.
|
||||
Binärdateien a/x64/fileio.o und b/x64/fileio.o sind verschieden.
|
||||
Binärdateien a/x64/firmware.o und b/x64/firmware.o sind verschieden.
|
||||
Binärdateien a/x64/flashrom.o und b/x64/flashrom.o sind verschieden.
|
||||
Binärdateien a/x64/lanio.o und b/x64/lanio.o sind verschieden.
|
||||
Binärdateien a/x64/linuxserio.o und b/x64/linuxserio.o sind verschieden.
|
||||
Binärdateien a/x64/server.o und b/x64/server.o sind verschieden.
|
||||
Binärdateien a/x64/webserver.o und b/x64/webserver.o sind verschieden.
|
||||
Binärdateien a/x64/xap.o und b/x64/xap.o sind verschieden.
|
||||
Binärdateien a/x64/xbmc.o und b/x64/xbmc.o sind verschieden.
|
||||
--- a/xap.c
|
||||
+++ b/xap.c
|
||||
@@ -73,6 +73,7 @@
|
||||
#include <signal.h>
|
||||
#include <netdb.h>
|
||||
@@ -301,9 +294,8 @@ diff '--color=auto' -uNr work.orig/xap.c work/xap.c
|
||||
|
||||
typedef int DWORD;
|
||||
|
||||
diff '--color=auto' -uNr work.orig/xbmc.c work/xbmc.c
|
||||
--- work.orig/xbmc.c 2026-04-06 11:49:22.773880650 +0200
|
||||
+++ work/xbmc.c 2026-04-06 12:31:57.712397396 +0200
|
||||
--- a/xbmc.c
|
||||
+++ b/xbmc.c
|
||||
@@ -61,6 +61,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
@@ -0,0 +1,10 @@
|
||||
--- work.orig/makefile 2026-04-07 20:24:23.085822616 +0300
|
||||
+++ work/makefile 2026-04-07 20:37:27.372562224 +0300
|
||||
@@ -1,7 +1,5 @@
|
||||
SHELL = /bin/sh
|
||||
|
||||
-CC = gcc
|
||||
-
|
||||
CFLAGS =
|
||||
CPPFLAGS = -DLINUX -DMEDIACENTER -D_LARGEFILE64_SOURCE
|
||||
LDFLAGS =
|
||||
@@ -0,0 +1,487 @@
|
||||
diff '--color=auto' -uNr work.orig/ascii.c work/ascii.c
|
||||
--- work.orig/ascii.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/ascii.c 2026-04-07 20:50:34.384999787 +0200
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/errormessage.c work/errormessage.c
|
||||
--- work.orig/errormessage.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/errormessage.c 2026-04-07 20:50:34.386527504 +0200
|
||||
@@ -60,6 +60,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "remote.h"
|
||||
#include "network.h"
|
||||
diff '--color=auto' -uNr work.orig/fileio.c work/fileio.c
|
||||
--- work.orig/fileio.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/fileio.c 2026-04-07 20:52:10.463403172 +0200
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
@@ -88,63 +89,52 @@
|
||||
|
||||
extern byte rcmmflag;
|
||||
|
||||
-#ifdef LINUX
|
||||
-
|
||||
|
||||
+#ifdef LINUX
|
||||
int ReadIRTransDirectory (char filetype[],REMOTEBUFFER *buf,int start,byte statustype)
|
||||
{
|
||||
+ DIR *dir;
|
||||
+ struct dirent *di;
|
||||
+ int fl, dlen;
|
||||
+ int cnt, cnt_total, nlen;
|
||||
+
|
||||
+ memset(buf, 0, sizeof(REMOTEBUFFER));
|
||||
+ buf->statustype = statustype;
|
||||
+ buf->statuslen = sizeof(REMOTEBUFFER);
|
||||
+ buf->offset = (short)start;
|
||||
+
|
||||
+ if (statustype == STATUS_IRDBFILE) dlen = 5;
|
||||
+ else dlen = 4;
|
||||
+
|
||||
+ dir = opendir(".");
|
||||
+ if (!dir) return -1;
|
||||
+
|
||||
+ cnt = cnt_total = 0;
|
||||
+
|
||||
+ while ((di = readdir(dir)) != NULL) {
|
||||
+ fl = (int)strlen(di->d_name) - dlen;
|
||||
+ if (fl >= 1 && !strcmp(di->d_name + fl, filetype)) {
|
||||
+ if (cnt_total >= start && cnt < 40) {
|
||||
+ nlen = (int)strlen(di->d_name) - dlen;
|
||||
+ if (nlen > 80) nlen = 80;
|
||||
+ memset(buf->remotes[cnt].name, ' ', 80);
|
||||
+ memcpy(buf->remotes[cnt].name, di->d_name, nlen);
|
||||
+ cnt++;
|
||||
+ }
|
||||
+ cnt_total++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ buf->count_buffer = cnt;
|
||||
+ buf->count_total = cnt_total;
|
||||
+ if (cnt == 40) buf->count_remaining = cnt_total - cnt;
|
||||
+ else buf->count_remaining = 0;
|
||||
|
||||
- int fd,i,len,pos,res,fl,dlen;
|
||||
- off64_t off = 0;
|
||||
- char st[2048],msg[256];
|
||||
- struct dirent64 *di;
|
||||
-
|
||||
- int cnt,cnt_total,nlen;
|
||||
- memset (buf,0,sizeof (REMOTEBUFFER));
|
||||
- buf->statustype = statustype;
|
||||
- buf->statuslen = sizeof (REMOTEBUFFER);
|
||||
- buf->offset = (short)start;
|
||||
-
|
||||
- if (statustype == STATUS_IRDBFILE) dlen = 5;
|
||||
- else dlen = 4;
|
||||
-
|
||||
- fd = open (".",0);
|
||||
-
|
||||
- cnt = cnt_total = 0;
|
||||
-
|
||||
- do {
|
||||
- len = getdirentries64 (fd,st,2048,&off);
|
||||
-
|
||||
- pos = 0;
|
||||
- while (pos < len) {
|
||||
- di = (struct dirent64 *)&st[pos];
|
||||
- fl = strlen (di -> d_name) - dlen;
|
||||
- if (fl >= 1 && !strcmp (di->d_name + fl,filetype)) {
|
||||
- if (cnt_total >= start && cnt < 40) {
|
||||
- nlen = strlen (di -> d_name) - dlen;
|
||||
- if (nlen > 80) nlen = 80;
|
||||
- memset (buf->remotes[cnt].name,' ',80);
|
||||
- memcpy (buf->remotes[cnt].name,di -> d_name,nlen);
|
||||
- cnt++;
|
||||
- }
|
||||
- cnt_total++;
|
||||
- }
|
||||
- pos += di -> d_reclen;
|
||||
- }
|
||||
- } while (len);
|
||||
-
|
||||
- buf->count_buffer = cnt;
|
||||
- buf->count_total = cnt_total;
|
||||
- if (cnt == 40) buf->count_remaining = cnt_total-cnt;
|
||||
- else buf->count_remaining = 0;
|
||||
-
|
||||
- close (fd);
|
||||
- return (0);
|
||||
+ closedir(dir);
|
||||
+ return 0;
|
||||
}
|
||||
-
|
||||
#endif
|
||||
|
||||
-
|
||||
#ifdef WIN32
|
||||
|
||||
int ReadIRTransDirectory (char filetype[],REMOTEBUFFER *buf,int start,byte statustype)
|
||||
diff '--color=auto' -uNr work.orig/firmware.c work/firmware.c
|
||||
--- work.orig/firmware.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/firmware.c 2026-04-07 20:57:02.787000833 +0200
|
||||
@@ -250,60 +250,49 @@
|
||||
buf->offset = start;
|
||||
cnt = cnt_total = 0;
|
||||
|
||||
-#ifdef LINUX
|
||||
-
|
||||
|
||||
- if (!start) {
|
||||
- GetHardwareType (bus);
|
||||
- //printf ("Type: %d\n",IRDevices[bus].fw_capabilities4);
|
||||
-
|
||||
- GetFirmwarePath (path);
|
||||
- fd = open ("../Firmware",0);
|
||||
-
|
||||
- do {
|
||||
- len = getdirentries64 (fd,st,2048,&off);
|
||||
-
|
||||
- pos = 0;
|
||||
- while (pos < len) {
|
||||
- di = (struct dirent64 *)&st[pos];
|
||||
- cnt_total++;
|
||||
- pos += di -> d_reclen;
|
||||
- }
|
||||
- } while (len);
|
||||
-
|
||||
- if (stat_fw_pnt) free (stat_fw_pnt);
|
||||
- stat_fw_pnt = malloc (cnt_total * sizeof (FIRMWARELINE));
|
||||
- firmware_file_cnt = 0;
|
||||
-
|
||||
- lseek (fd,0,SEEK_SET);
|
||||
-
|
||||
- do {
|
||||
- len = getdirentries64 (fd,st,2048,&off);
|
||||
-
|
||||
- pos = 0;
|
||||
- while (pos < len) {
|
||||
- di = (struct dirent64 *)&st[pos];
|
||||
-
|
||||
- res = GetFirmwareInfo (path,di -> d_name,bus,&info);
|
||||
- if (res != ERR_OPEN) {
|
||||
- if (cnt_total >= start && cnt < 40) {
|
||||
- strcpy (stat_fw_pnt[cnt].filename,di -> d_name);
|
||||
- strcpy (stat_fw_pnt[cnt].ir_version,info.ir_version);
|
||||
- strcpy (stat_fw_pnt[cnt].lan_version,info.net_version);
|
||||
- strcpy (stat_fw_pnt[cnt].devicetype,info.devicetype);
|
||||
- stat_fw_pnt[cnt].firmware_flags = info.firmware_flag;
|
||||
- stat_fw_pnt[cnt].net_flag = info.net_type;
|
||||
- cnt++;
|
||||
- }
|
||||
- }
|
||||
- pos += di -> d_reclen;
|
||||
- }
|
||||
- } while (len);
|
||||
+#ifdef LINUX
|
||||
+ if (!start) {
|
||||
+ DIR *dir;
|
||||
+ struct dirent *di;
|
||||
+
|
||||
+ GetHardwareType(bus);
|
||||
+ GetFirmwarePath(path);
|
||||
+
|
||||
+ dir = opendir("../Firmware");
|
||||
+ if (!dir) return ERR_OPEN;
|
||||
+
|
||||
+ cnt_total = 0;
|
||||
+ while ((di = readdir(dir)) != NULL) {
|
||||
+ cnt_total++;
|
||||
+ }
|
||||
+ closedir(dir);
|
||||
|
||||
- close (fd);
|
||||
- firmware_file_cnt = cnt;
|
||||
+ if (stat_fw_pnt) free(stat_fw_pnt);
|
||||
+ stat_fw_pnt = malloc(cnt_total * sizeof(FIRMWARELINE));
|
||||
+ firmware_file_cnt = 0;
|
||||
+
|
||||
+ dir = opendir("../Firmware");
|
||||
+ if (!dir) return ERR_OPEN;
|
||||
+
|
||||
+ while ((di = readdir(dir)) != NULL) {
|
||||
+ res = GetFirmwareInfo(path, di->d_name, bus, &info);
|
||||
+ if (res != ERR_OPEN) {
|
||||
+ if (cnt_total >= start && cnt < 40) {
|
||||
+ strcpy(stat_fw_pnt[cnt].filename, di->d_name);
|
||||
+ strcpy(stat_fw_pnt[cnt].ir_version, info.ir_version);
|
||||
+ strcpy(stat_fw_pnt[cnt].lan_version, info.net_version);
|
||||
+ strcpy(stat_fw_pnt[cnt].devicetype, info.devicetype);
|
||||
+ stat_fw_pnt[cnt].firmware_flags = info.firmware_flag;
|
||||
+ stat_fw_pnt[cnt].net_flag = info.net_type;
|
||||
+ cnt++;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
+ closedir(dir);
|
||||
+ firmware_file_cnt = cnt;
|
||||
+ }
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
diff '--color=auto' -uNr work.orig/flashrom.c work/flashrom.c
|
||||
--- work.orig/flashrom.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/flashrom.c 2026-04-07 20:50:34.385457210 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "remote.h"
|
||||
#include "errcode.h"
|
||||
diff '--color=auto' -uNr work.orig/lanio.c work/lanio.c
|
||||
--- work.orig/lanio.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/lanio.c 2026-04-07 20:50:34.385587862 +0200
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <sys/timeb.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/linuxserio.c work/linuxserio.c
|
||||
--- work.orig/linuxserio.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/linuxserio.c 2026-04-07 20:50:34.386600521 +0200
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <sys/un.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "remote.h"
|
||||
#include "errcode.h"
|
||||
diff '--color=auto' -uNr work.orig/lowlevel.c work/lowlevel.c
|
||||
--- work.orig/lowlevel.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/lowlevel.c 2026-04-07 20:50:34.385905382 +0200
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/mce.c work/mce.c
|
||||
--- work.orig/mce.c 2026-04-07 20:49:42.567580930 +0200
|
||||
+++ work/mce.c 2026-04-07 20:50:34.385678639 +0200
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/server.c work/server.c
|
||||
--- work.orig/server.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/server.c 2026-04-07 20:54:28.755962894 +0200
|
||||
@@ -77,6 +77,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
|
||||
@@ -3030,93 +3031,69 @@
|
||||
|
||||
int ReadIRDatabase (void)
|
||||
{
|
||||
+ int res, fl;
|
||||
+ char st[2048], msg[256];
|
||||
+ DIR *dir;
|
||||
+ struct dirent *di;
|
||||
+ char *home = getenv("HOME");
|
||||
+ char *rdir = getenv("IRTRANS_REMOTES");
|
||||
+
|
||||
+ if (irdb_path[0]) {
|
||||
+ if (chdir(irdb_path)) {
|
||||
+ sprintf(msg, "Error opening remote database %s\n", irdb_path);
|
||||
+ log_print(msg, LOG_FATAL);
|
||||
+ return ERR_NODATABASE;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (rdir) {
|
||||
+ if (chdir(rdir)) {
|
||||
+ sprintf(msg, "Error opening remote database %s\n", rdir);
|
||||
+ log_print(msg, LOG_FATAL);
|
||||
+ return ERR_NODATABASE;
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ if (home)
|
||||
+ snprintf(st, sizeof(st), "%s/.irtrans/remotes", home);
|
||||
+
|
||||
+ if (IRDataBaseRead) FreeDatabaseMemory();
|
||||
+ else if (chdir("./remotes")
|
||||
+ && !(home && chdir(st) == 0)
|
||||
+ && chdir("/etc/irserver/remotes")
|
||||
+ && chdir("/usr/local/share/irtrans/remotes")
|
||||
+ && chdir("/usr/share/irtrans/remotes"))
|
||||
+ return ERR_NODATABASE;
|
||||
+ }
|
||||
|
||||
- int fd,i,len,pos,res,fl;
|
||||
- off64_t off = 0;
|
||||
- char st[2048],msg[256];
|
||||
- struct dirent64 *di;
|
||||
- char *home = getenv("HOME");
|
||||
- char *rdir = getenv("IRTRANS_REMOTES");
|
||||
-
|
||||
- if (irdb_path[0]) {
|
||||
- if (chdir (irdb_path)) {
|
||||
- sprintf (msg,"Error opening remote database %s\n",irdb_path);
|
||||
- log_print (msg,LOG_FATAL);
|
||||
- return (ERR_NODATABASE);
|
||||
- }
|
||||
- }
|
||||
- else if (rdir) {
|
||||
- if (chdir (rdir)) {
|
||||
- sprintf (msg,"Error opening remote database %s\n",rdir);
|
||||
- log_print (msg,LOG_FATAL);
|
||||
-
|
||||
- return (ERR_NODATABASE);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- else {
|
||||
- if (home)
|
||||
- snprintf(st, sizeof(st), "%s/.irtrans/remotes", home);
|
||||
-
|
||||
- if (IRDataBaseRead) FreeDatabaseMemory ();
|
||||
-
|
||||
- else if (chdir ("./remotes")
|
||||
- && !(home && chdir (st) == 0)
|
||||
- && chdir ("/etc/irserver/remotes")
|
||||
- && chdir ("/usr/local/share/irtrans/remotes")
|
||||
- && chdir ("/usr/share/irtrans/remotes")) return (ERR_NODATABASE);
|
||||
- }
|
||||
-
|
||||
- sprintf (msg,"Chdir to DB OK\n");
|
||||
- log_print (msg,LOG_DEBUG);
|
||||
-
|
||||
- ReadRoutingTable ();
|
||||
-
|
||||
- sprintf (msg,"Read routing OK\n");
|
||||
- log_print (msg,LOG_DEBUG);
|
||||
-
|
||||
- ReadSwitches ();
|
||||
-
|
||||
- sprintf (msg,"Read Switches OK\n");
|
||||
- log_print (msg,LOG_DEBUG);
|
||||
-
|
||||
- fd = open (".",0);
|
||||
+ sprintf(msg, "Chdir to DB OK\n");
|
||||
+ log_print(msg, LOG_DEBUG);
|
||||
|
||||
- sprintf (msg,"Open DIR: %d\n",fd);
|
||||
- log_print (msg,LOG_DEBUG);
|
||||
+ ReadRoutingTable();
|
||||
+ ReadSwitches();
|
||||
|
||||
- do {
|
||||
- len = getdirentries64 (fd,st,2048,&off);
|
||||
-
|
||||
- sprintf (msg,"Get Dirent: %d\n",len);
|
||||
- log_print (msg,LOG_DEBUG);
|
||||
-
|
||||
- pos = 0;
|
||||
- while (pos < len) {
|
||||
- di = (struct dirent64 *)&st[pos];
|
||||
- fl = strlen (di -> d_name) - 4;
|
||||
- if (fl >= 1 && !strcmp (di->d_name + fl,".rem")) {
|
||||
- res = DBReadCommandFile (di->d_name);
|
||||
- if (res) {
|
||||
- sprintf (msg,"Error %d reading DB-File %s\n",res,di->d_name);
|
||||
- log_print (msg,LOG_ERROR);
|
||||
- }
|
||||
- }
|
||||
- pos += di -> d_reclen;
|
||||
- }
|
||||
- } while (len);
|
||||
+ dir = opendir(".");
|
||||
+ if (!dir) return ERR_NODATABASE;
|
||||
|
||||
- close (fd);
|
||||
+ while ((di = readdir(dir)) != NULL) {
|
||||
+ fl = (int)strlen(di->d_name) - 4;
|
||||
+ if (fl >= 1 && !strcmp(di->d_name + fl, ".rem")) {
|
||||
+ res = DBReadCommandFile(di->d_name);
|
||||
+ if (res) {
|
||||
+ sprintf(msg, "Error %d reading DB-File %s\n", res, di->d_name);
|
||||
+ log_print(msg, LOG_ERROR);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- res = DBReferenceLinks ();
|
||||
+ closedir(dir);
|
||||
|
||||
- DBShowStatus ();
|
||||
- ReadAppConfig ();
|
||||
+ res = DBReferenceLinks();
|
||||
+ DBShowStatus();
|
||||
+ ReadAppConfig();
|
||||
|
||||
- IRDataBaseRead = 1;
|
||||
- return (0);
|
||||
+ IRDataBaseRead = 1;
|
||||
+ return 0;
|
||||
}
|
||||
-
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff '--color=auto' -uNr work.orig/webserver.c work/webserver.c
|
||||
--- work.orig/webserver.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/webserver.c 2026-04-07 20:50:34.392459424 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
|
||||
typedef int DWORD;
|
||||
#define closesocket close
|
||||
diff '--color=auto' -uNr work.orig/xap.c work/xap.c
|
||||
--- work.orig/xap.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/xap.c 2026-04-07 20:50:34.392643874 +0200
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#ifdef LINUX
|
||||
#include <time.h>
|
||||
diff '--color=auto' -uNr work.orig/xbmc.c work/xbmc.c
|
||||
--- work.orig/xbmc.c 2026-04-07 20:49:42.573581007 +0200
|
||||
+++ work/xbmc.c 2026-04-07 20:50:34.392567255 +0200
|
||||
@@ -46,6 +46,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
#ifdef LINUX
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic toolchain-funcs mono-env systemd
|
||||
inherit flag-o-matic toolchain-funcs mono-env systemd wrapper
|
||||
|
||||
DESCRIPTION="Server software for IRTrans"
|
||||
HOMEPAGE="http://www.irtrans.de"
|
||||
SRC_URI="http://ftp.disconnected-by-peer.at/irtrans/irserver-src-${PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/irtrans/irserver-${PV}.tar.gz
|
||||
http://www.irtrans.de/download/Server/Linux/irserver-src.tar.gz -> irserver-src-${PV}.tar.gz
|
||||
http://www.irtrans.de/download/Server/Linux/irserver.tar.gz -> irserver-${PV}.tar.gz"
|
||||
HOMEPAGE="https://www.irtrans.de"
|
||||
SRC_URI="https://ftp.disconnected-by-peer.at/irtrans/irserver-src-${PV}.tar.gz
|
||||
https://ftp.disconnected-by-peer.at/irtrans/irserver-${PV}.tar.gz
|
||||
https://www.irtrans.de/download/Server/Linux/irserver-src.tar.gz -> irserver-src-${PV}.tar.gz
|
||||
https://www.irtrans.de/download/Server/Linux/irserver.tar.gz -> irserver-${PV}.tar.gz"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="BSD GPL-2"
|
||||
SLOT="0"
|
||||
@@ -20,14 +22,13 @@ RESTRICT="strip"
|
||||
|
||||
RDEPEND="mono? ( >=dev-lang/mono-2.10.5 )"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/gcc15.patch "${FILESDIR}"/server-warnings.patch )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -e 's!^ODIRARM = .*!ODIRARM = n800!' -i makefile || die
|
||||
}
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-gcc15.patch"
|
||||
"${FILESDIR}/${P}-musl.patch"
|
||||
"${FILESDIR}/${P}-makefile.patch"
|
||||
"${FILESDIR}/${P}-warnings.patch"
|
||||
"${FILESDIR}/${P}-ethernet.patch"
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
append-cppflags -DLINUX -DMEDIACENTER
|
||||
|
||||
Reference in New Issue
Block a user