Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
Digital Video Broadcasting (DVB) utilities for the initial setup, testing,
and operation of a DVB device

View File

@@ -0,0 +1,45 @@
# $NetBSD: Makefile,v 1.6 2013/05/31 12:41:30 wiz Exp $
#
PKGNAME= dvb-apps-20110713
PKGREVISION= 3
DISTNAME= 148ede2a6809
DIST_SUBDIR= dvb-apps
CATEGORIES= multimedia
MASTER_SITES= http://linuxtv.org/hg/dvb-apps/archive/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://linuxtv.org/
COMMENT= Digital Video Broadcasting (DVB) applications
# netbsd-5 does not have dev/dtv/dtvio.h or its associated functionality.
# (allow 5.99.* as relatively recent 5.99 may still be in use and should work)
NOT_FOR_PLATFORM+= NetBSD-5.[0-8]*
USE_TOOLS+= gmake perl
WRKSRC= ${WRKDIR}/dvb-apps-148ede2a6809
do-build:
cd ${WRKSRC}/lib/libdvbapi && gmake prefix=${PREFIX}
cd ${WRKSRC}/lib/libucsi && gmake prefix=${PREFIX}
cd ${WRKSRC}/util/atsc_epg&& gmake prefix=${PREFIX}
cd ${WRKSRC}/util/dvbdate && gmake prefix=${PREFIX}
cd ${WRKSRC}/util/scan && gmake prefix=${PREFIX}
cd ${WRKSRC}/util/szap && gmake prefix=${PREFIX}
do-install:
cd ${WRKSRC}/lib/libdvbapi && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ${WRKSRC}/lib/libucsi && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ${WRKSRC}/util/atsc_epg && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ${WRKSRC}/util/dvbdate && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ${WRKSRC}/util/scan && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
cd ${WRKSRC}/util/szap && \
gmake DESTDIR=${DESTDIR} prefix=${PREFIX} install
.include "../../mk/bsd.pkg.mk"

1021
multimedia/dvb-apps/PLIST Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,101 @@
$NetBSD: distinfo,v 1.2 2011/07/15 22:59:20 jmcneill Exp $
SHA1 (dvb-apps/148ede2a6809.tar.gz) = 1d7b7713cce5a2a1db4a5639789140b5c3ba272f
RMD160 (dvb-apps/148ede2a6809.tar.gz) = b024e3fa143d4b89ce842aeb799217f48c0df58a
Size (dvb-apps/148ede2a6809.tar.gz) = 516680 bytes
SHA1 (patch-lib_libdvbapi_dvbaudio.c) = 9f6ce96ac66a505ae535e59af04ea3aff6749147
SHA1 (patch-lib_libdvbapi_dvbca.c) = fb634395e1f9d0e3dc42f60bdf6d581fc11312ca
SHA1 (patch-lib_libdvbapi_dvbdemux.c) = 60f7c927878f0923a355a329b93afe30a2f335d0
SHA1 (patch-lib_libdvbapi_dvbfe.c) = 44ee918a5c09aa1947c0f5d9c6148607e67b75bb
SHA1 (patch-lib_libdvbapi_dvbnet.c) = cee386a3535c676de3a3062c2f9098816b828120
SHA1 (patch-lib_libdvbapi_dvbvideo.c) = fdbb9a3a899ef0f5cc78a897c69e1678f64e1a0d
SHA1 (patch-lib_libucsi_atsc_caption__service__descriptor.h) = 65abe88270e298dc728e7d4409860744a2ea593d
SHA1 (patch-lib_libucsi_atsc_cvct__section.c) = 796d37b4b1e55b19ef40579d9492365dd23e54ff
SHA1 (patch-lib_libucsi_atsc_dccsct__section.c) = da8327a47cdf9d27c03ac5fe98dff6848646bef7
SHA1 (patch-lib_libucsi_atsc_dcct__section.c) = 46331e68633e430466c46b086dc12d6c0e585385
SHA1 (patch-lib_libucsi_atsc_eit__section.c) = b6bb014d27cbf5e0ffa22c6036fe3db0b9338022
SHA1 (patch-lib_libucsi_atsc_ett__section.c) = e47693a38fcbb4a623922d5ac2595ffcd4cb74ed
SHA1 (patch-lib_libucsi_atsc_mgt__section.c) = edf2a13657fb004db415d4e69aa05cb92768f38a
SHA1 (patch-lib_libucsi_atsc_service__location__descriptor.h) = 8a7c2d16ba35cb1249906f5afd7548269c44269e
SHA1 (patch-lib_libucsi_atsc_stt__section.c) = 001f88e6e6d0265760c8c418e6c45311947ca2c2
SHA1 (patch-lib_libucsi_atsc_time__shifted__service__descriptor.h) = 8ff522f574251abebc67bdc5c0f1db246a33b3d3
SHA1 (patch-lib_libucsi_atsc_tvct__section.c) = ac4a9b9aed7f403d931e6ffddc815cdecf601497
SHA1 (patch-lib_libucsi_dvb_ait__application__descriptor.h) = b9242fef5bc2ee004d9a80cc5380c95c6eed3d30
SHA1 (patch-lib_libucsi_dvb_ait__application__icons__descriptor.h) = 7046c6dd7f24f93207237db4c1b52e8001075d35
SHA1 (patch-lib_libucsi_dvb_ait__external__application__authorisation__descriptor.h) = 899734acb024caa7c28e9f53a2db261e792d95ed
SHA1 (patch-lib_libucsi_dvb_announcement__support__descriptor.h) = 64da8c3bc71a45659266eb60d3f3078b8da589af
SHA1 (patch-lib_libucsi_dvb_application__signalling__descriptor.h) = f427795d3239eafcc28d5c3625383a01d3af436b
SHA1 (patch-lib_libucsi_dvb_bat__section.c) = 93a13b4faa18384897f67f6cdc91459a3e702496
SHA1 (patch-lib_libucsi_dvb_ca__identifier__descriptor.h) = 3ba7641686b206986ab63b1a5d22a2f3ea66b2e0
SHA1 (patch-lib_libucsi_dvb_cable__delivery__descriptor.h) = 5e4373fdb998f709739c8b1896f0083c712c9201
SHA1 (patch-lib_libucsi_dvb_cell__frequency__link__descriptor.h) = 12381b0cd52c37fd2c4404d2cdf26a13dbe668bd
SHA1 (patch-lib_libucsi_dvb_cell__list__descriptor.h) = ae5b23d76fc9b95a40274bae36bbf642f4e91463
SHA1 (patch-lib_libucsi_dvb_content__identifier__descriptor.h) = 4ad261afacd33bd5276335fc4c1c9878db659331
SHA1 (patch-lib_libucsi_dvb_data__broadcast__descriptor.h) = 34e84c8604df56bcfb3e2e3923b18252ea96425c
SHA1 (patch-lib_libucsi_dvb_data__broadcast__id__descriptor.h) = 60ed410244e1bc396344ea852809b24e0bdf4b2b
SHA1 (patch-lib_libucsi_dvb_eit__section.c) = fd7f415fc00631578fd3d6bb91a321e5d463d6e9
SHA1 (patch-lib_libucsi_dvb_frequency__list__descriptor.h) = 60eedf2fac2bc03e12724160b88af2180d5b6243
SHA1 (patch-lib_libucsi_dvb_int__section.c) = a52ce4328b742854ed408e2bd18b37ff50e56c37
SHA1 (patch-lib_libucsi_dvb_ip__mac__stream__location__descriptor.h) = e85989b902c0ce40d2065fc12a0b8da8b1b7c104
SHA1 (patch-lib_libucsi_dvb_linkage__descriptor.h) = d9912c3593ee5dddc3a84d495113d730aff17698
SHA1 (patch-lib_libucsi_dvb_mhp__data__broadcast__id__descriptor.h) = 06d615f06942c64228c6e2d58b6d935cfbbd7d40
SHA1 (patch-lib_libucsi_dvb_mosaic__descriptor.h) = 6ff55e9970b990a6059b447e161abcb875b9ffb2
SHA1 (patch-lib_libucsi_dvb_nit__section.c) = 8af79ce6c3d032e52f7376a619d6e1d55810b8b2
SHA1 (patch-lib_libucsi_dvb_nvod__reference__descriptor.h) = 6374a1fb4c481b74dcb83b5c35f4fee7db654fd6
SHA1 (patch-lib_libucsi_dvb_partial__transport__stream__descriptor.h) = 5ff7b0a9324f336a23743c2a09b6de94d4ebb674
SHA1 (patch-lib_libucsi_dvb_pdc__descriptor.h) = 0a128836502682b65a2e266e6c348854cdcfea31
SHA1 (patch-lib_libucsi_dvb_private__data__specifier__descriptor.h) = ed27342e9ddc5cc44d9273f28af1290c31600ea7
SHA1 (patch-lib_libucsi_dvb_rnt__rar__over__dvb__stream__descriptor.h) = 6263626a0bdaabc28740f39fb50149aa20f83fe0
SHA1 (patch-lib_libucsi_dvb_rnt__rnt__scan__descriptor.h) = c77e8c2f2f2c715a364e7fa4f53f3fef3c5a406a
SHA1 (patch-lib_libucsi_dvb_rst__section.c) = 80fb77dc592020553b8faf864dcae89ddf76ea11
SHA1 (patch-lib_libucsi_dvb_satellite__delivery__descriptor.h) = 3a60a553329f18d593d68aec160d59e512329277
SHA1 (patch-lib_libucsi_dvb_sdt__section.c) = 46902f7859fe3b84cf186f2f82fe455ba942603c
SHA1 (patch-lib_libucsi_dvb_service__availability__descriptor.h) = f764b919b51c197a3a59484620314701750d1777
SHA1 (patch-lib_libucsi_dvb_service__list__descriptor.h) = d4ddff67374a8fe0e2a85bcd1c10613a04ec18e1
SHA1 (patch-lib_libucsi_dvb_service__move__descriptor.h) = 9b373fc990db796ba9aae2a5cca32ff0d5d721d2
SHA1 (patch-lib_libucsi_dvb_sit__section.c) = ca31ea1fb03d5d72109b3bfd0abdfa936f93bf64
SHA1 (patch-lib_libucsi_dvb_subtitling__descriptor.h) = ed992e46477e0825dc5fabec531729367f8c3a8f
SHA1 (patch-lib_libucsi_dvb_terrestrial__delivery__descriptor.h) = 655ba1ad362d92eeb1e239eb3d3c2fe0abab5025
SHA1 (patch-lib_libucsi_dvb_time__shifted__event__descriptor.h) = 444b5fa3ef5ad4190122a31d054363f6b1e1407e
SHA1 (patch-lib_libucsi_dvb_time__shifted__service__descriptor.h) = 53a053696d158a349bea9e269df47158b9ed7738
SHA1 (patch-lib_libucsi_dvb_tot__section.c) = b250647e6c1934d9cc93ce9156535cb7acad09f2
SHA1 (patch-lib_libucsi_dvb_tva__id__descriptor.h) = 89d5855a5fee19474e55ca74e4a7fc1ee115f6fe
SHA1 (patch-lib_libucsi_endianops.h) = 91b0dd87b99e9c87df681b6ab94ab153fe7b14e4
SHA1 (patch-lib_libucsi_mpeg_ca__descriptor.h) = fb557f6495ed0a5108c29214a6f274691f28ebf0
SHA1 (patch-lib_libucsi_mpeg_content__labelling__descriptor.h) = 25ef9d51a6e484f6b9f08350f12d0ade896d52a5
SHA1 (patch-lib_libucsi_mpeg_copyright__descriptor.h) = b23341d75f6f44db0e7b3fc94c3596968636f2fe
SHA1 (patch-lib_libucsi_mpeg_external__es__id__descriptor.h) = 58603359208835bba24cd69d7b92b648e0d596ce
SHA1 (patch-lib_libucsi_mpeg_fmc__descriptor.h) = cf2f55001d608619d9008330e2c1ce37fb10a6cb
SHA1 (patch-lib_libucsi_mpeg_ibp__descriptor.h) = aacecadd8ab0d73dda76fcaa1ecca9c7d5c59cdc
SHA1 (patch-lib_libucsi_mpeg_maximum__bitrate__descriptor.h) = 57c2993e1f926ec2d4a89c5b6843dfa08c41677d
SHA1 (patch-lib_libucsi_mpeg_metadata__descriptor.h) = 6776a00e94dbd34b1552fb4a62eed5fe2eb099ab
SHA1 (patch-lib_libucsi_mpeg_metadata__pointer__descriptor.h) = 9bb0d0b79f3740ece2e494fd9a1f8acd7be92989
SHA1 (patch-lib_libucsi_mpeg_metadata__std__descriptor.h) = 00308be4c49d0c238c32d9cc181f38a51cd5c752
SHA1 (patch-lib_libucsi_mpeg_multiplex__buffer__descriptor.h) = a6ea0b20351c336965c504830e17eb02ed7c57d7
SHA1 (patch-lib_libucsi_mpeg_multiplex__buffer__utilization__descriptor.h) = 96182d68a27bdfaeb3d94343a01adbabd0abf6ad
SHA1 (patch-lib_libucsi_mpeg_odsmt__section.c) = 06d12a9e10f6c9277a6a2397c7a92a78c5d5088a
SHA1 (patch-lib_libucsi_mpeg_pat__section.c) = 5c8757147d6df965ec6bed1b99a395ebe1b10d5b
SHA1 (patch-lib_libucsi_mpeg_pmt__section.c) = 59d5487fba62b5e1e580581e2034a528b81432e7
SHA1 (patch-lib_libucsi_mpeg_private__data__indicator__descriptor.h) = b88931ac8f6bd4df0b49a1a340ae97f6eaccf0bd
SHA1 (patch-lib_libucsi_mpeg_registration__descriptor.h) = 6d5fa1ec8e89f4b90e1638aee6aab75eebec74fa
SHA1 (patch-lib_libucsi_mpeg_sl__descriptor.h) = 1a57c635d3e86f7647b95548f12b48287d3868b9
SHA1 (patch-lib_libucsi_mpeg_smoothing__buffer__descriptor.h) = 1e410488c5ff384d3bb60c78acbb627b83aa07cd
SHA1 (patch-lib_libucsi_mpeg_target__background__grid__descriptor.h) = 4a952a91af8e668ae68e196cf98549393fc56081
SHA1 (patch-lib_libucsi_mpeg_video__window__descriptor.h) = ef556b48541a88096349f6a8da5dc2e18ee03604
SHA1 (patch-lib_libucsi_section.h) = 07478dd172f576a31185fc6dda871a55885d796f
SHA1 (patch-util_atsc__epg_Makefile) = f07b266b5fae463662fc1edda0893cf932657b84
SHA1 (patch-util_dvbdate_Makefile) = 9c6bbc5554418d5f414d2bb30c077e556f143c4a
SHA1 (patch-util_dvbdate_dvbdate.c) = e8a855866c52de845ac7daf3c7c22280bb710a22
SHA1 (patch-util_scan_diseqc.c) = 048e7e3dac5e8f096e926bdb971257f263f8cd01
SHA1 (patch-util_scan_diseqc.h) = 2dc00e508282fd7fc73e0b94556eff7bbd54332b
SHA1 (patch-util_scan_dump-vdr.c) = 82f89c3a687744632d59df53d788df92c4d678f3
SHA1 (patch-util_scan_dump-vdr.h) = 28fa7f3bd25f72bc305de180a76ad56283c11de9
SHA1 (patch-util_scan_dump-zap.c) = fea36c5447734fba91ec0f1b4aa9f6e32e59e158
SHA1 (patch-util_scan_dump-zap.h) = 238f11ca1b8b75910391f62397a9ae824fa2ad28
SHA1 (patch-util_scan_lnb.c) = 34592aef076e6b508a0a22d70af69029388a1946
SHA1 (patch-util_scan_scan.c) = b327a1740b80d7a7c659c1a8566543e532909044
SHA1 (patch-util_szap_azap.c) = 10ded4959a24a11c2196dc12a1ecb58a8b6b81b5
SHA1 (patch-util_szap_czap.c) = 06a2f9a3fd6019ee6a843e5072cd08521f7803a7
SHA1 (patch-util_szap_szap.c) = ce8c992c227f0051bf7a72da031ed824d4caaee2
SHA1 (patch-util_szap_tzap.c) = 6706ea1161617022b7f769ff2555b595fd456e84
SHA1 (patch-util_szap_util.c) = 2d4026edd77096aa02d898b4449a22841962bbf1

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-lib_libdvbapi_dvbaudio.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbaudio.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbaudio.c
@@ -25,7 +25,11 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/audio.h>
+#endif
#include <errno.h>
#include "dvbaudio.h"
@@ -46,5 +50,9 @@ int dvbaudio_open(int adapter, int audio
int dvbaudio_set_bypass(int fd, int bypass)
{
+#ifdef AUDIO_SET_BYPASS_MODE
return ioctl(fd, AUDIO_SET_BYPASS_MODE, bypass);
+#else
+ return -1;
+#endif
}

View File

@@ -0,0 +1,88 @@
$NetBSD: patch-lib_libdvbapi_dvbca.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbca.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbca.c
@@ -27,7 +27,11 @@
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/ca.h>
+#endif
#include "dvbca.h"
@@ -48,11 +52,16 @@ int dvbca_open(int adapter, int cadevice
int dvbca_reset(int fd, uint8_t slot)
{
+#ifdef CA_RESET
return ioctl(fd, CA_RESET, (1 << slot));
+#else
+ return -1;
+#endif
}
int dvbca_get_interface_type(int fd, uint8_t slot)
{
+#ifdef CA_GET_SLOT_INFO
ca_slot_info_t info;
info.num = slot;
@@ -63,12 +72,14 @@ int dvbca_get_interface_type(int fd, uin
return DVBCA_INTERFACE_LINK;
if (info.type & CA_CI)
return DVBCA_INTERFACE_HLCI;
+#endif
return -1;
}
int dvbca_get_cam_state(int fd, uint8_t slot)
{
+#ifdef CA_GET_SLOT_INFO
ca_slot_info_t info;
info.num = slot;
@@ -81,6 +92,7 @@ int dvbca_get_cam_state(int fd, uint8_t
return DVBCA_CAMSTATE_READY;
if (info.flags & CA_CI_MODULE_PRESENT)
return DVBCA_CAMSTATE_INITIALISING;
+#endif
return -1;
}
@@ -123,6 +135,7 @@ int dvbca_link_read(int fd, uint8_t *slo
int dvbca_hlci_write(int fd, uint8_t *data, uint16_t data_length)
{
+#ifdef CA_SEND_MSG
struct ca_msg msg;
if (data_length > 256) {
@@ -134,11 +147,15 @@ int dvbca_hlci_write(int fd, uint8_t *da
memcpy(msg.msg, data, data_length);
return ioctl(fd, CA_SEND_MSG, &msg);
+#else
+ return -1;
+#endif
}
int dvbca_hlci_read(int fd, uint32_t app_tag, uint8_t *data,
uint16_t data_length)
{
+#ifdef CA_GET_MSG
struct ca_msg msg;
if (data_length > 256) {
@@ -156,4 +173,7 @@ int dvbca_hlci_read(int fd, uint32_t app
if (msg.length > data_length) msg.length = data_length;
memcpy(data, msg.msg, msg.length);
return msg.length;
+#else
+ return -1;
+#endif
}

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-lib_libdvbapi_dvbdemux.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbdemux.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbdemux.c
@@ -27,7 +27,11 @@
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/dmx.h>
+#endif
#include "dvbdemux.h"

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-lib_libdvbapi_dvbfe.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbfe.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbfe.c
@@ -32,7 +32,11 @@
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
#include <libdvbmisc/dvbmisc.h>
#include "dvbfe.h"

View File

@@ -0,0 +1,56 @@
$NetBSD: patch-lib_libdvbapi_dvbnet.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbnet.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbnet.c
@@ -25,7 +25,11 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/net.h>
+#endif
#include <errno.h>
#include "dvbnet.h"
@@ -46,6 +50,7 @@ int dvbnet_open(int adapter, int netdevi
int dvbnet_add_interface(int fd, uint16_t pid, enum dvbnet_encap encapsulation)
{
+#ifdef NET_ADD_IF
struct dvb_net_if params;
int status;
@@ -69,10 +74,14 @@ int dvbnet_add_interface(int fd, uint16_
if (status < 0)
return status;
return params.if_num;
+#else
+ return -1;
+#endif
}
int dvbnet_get_interface(int fd, int ifnum, uint16_t *pid, enum dvbnet_encap *encapsulation)
{
+#ifdef NET_GET_IF
struct dvb_net_if info;
int res;
@@ -96,9 +105,16 @@ int dvbnet_get_interface(int fd, int ifn
return -EINVAL;
}
return 0;
+#else
+ return -1;
+#endif
}
int dvbnet_remove_interface(int fd, int ifnum)
{
+#ifdef NET_REMOVE_IF
return ioctl(fd, NET_REMOVE_IF, ifnum);
+#else
+ return -1;
+#endif
}

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-lib_libdvbapi_dvbvideo.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libdvbapi/dvbvideo.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libdvbapi/dvbvideo.c
@@ -25,8 +25,13 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
+#ifdef __NetBSD__
+#include <sys/types.h>
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/types.h>
#include <linux/dvb/video.h>
+#endif
#include <errno.h>
#include "dvbvideo.h"

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_atsc_caption__service__descriptor.h,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/caption_service_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/caption_service_descriptor.h
@@ -78,7 +78,7 @@ static inline struct atsc_caption_servic
if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
return NULL;
- bswap16(buf+pos+4);
+ ubswap16(buf+pos+4);
pos += sizeof(struct atsc_caption_service_entry);
}

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-lib_libucsi_atsc_cvct__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/cvct_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/cvct_section.c
@@ -40,13 +40,13 @@ struct atsc_cvct_section *atsc_cvct_sect
pos += 7*2;
- bswap32(buf+pos);
- bswap32(buf+pos+4);
- bswap16(buf+pos+8);
- bswap16(buf+pos+10);
- bswap16(buf+pos+12);
- bswap16(buf+pos+14);
- bswap16(buf+pos+16);
+ ubswap32(buf+pos);
+ ubswap32(buf+pos+4);
+ ubswap16(buf+pos+8);
+ ubswap16(buf+pos+10);
+ ubswap16(buf+pos+12);
+ ubswap16(buf+pos+14);
+ ubswap16(buf+pos+16);
pos+=18;
if ((pos + channel->descriptors_length) > len)
@@ -61,7 +61,7 @@ struct atsc_cvct_section *atsc_cvct_sect
return NULL;
struct atsc_cvct_section_part2 *part2 = (struct atsc_cvct_section_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=2;
if ((pos + part2->descriptors_length) > len)

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-lib_libucsi_atsc_dccsct__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/dccsct_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/dccsct_section.c
@@ -65,7 +65,7 @@ struct atsc_dccsct_section *atsc_dccsct_
int sublen = sizeof(struct atsc_dccsct_update_new_county);
if (update->update_data_length < sublen)
return NULL;
- bswap16(buf+pos+1);
+ ubswap16(buf+pos+1);
if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
return NULL;
@@ -78,7 +78,7 @@ struct atsc_dccsct_section *atsc_dccsct_
return NULL;
struct atsc_dccsct_update_part2 *part2 = (struct atsc_dccsct_update_part2 *) buf + pos;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_dccsct_update_part2);
if (len < (pos + part2->descriptors_length))
@@ -93,7 +93,7 @@ struct atsc_dccsct_section *atsc_dccsct_
return NULL;
struct atsc_dccsct_section_part2 *part2 = (struct atsc_dccsct_section_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_dccsct_section_part2);
if (len < (pos + part2->descriptors_length))

View File

@@ -0,0 +1,48 @@
$NetBSD: patch-lib_libucsi_atsc_dcct__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/dcct_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/dcct_section.c
@@ -39,10 +39,10 @@ struct atsc_dcct_section *atsc_dcct_sect
return NULL;
struct atsc_dcct_test *test = (struct atsc_dcct_test *) (buf+pos);
- bswap24(buf+pos);
- bswap24(buf+pos+3);
- bswap32(buf+pos+6);
- bswap32(buf+pos+10);
+ ubswap24(buf+pos);
+ ubswap24(buf+pos+3);
+ ubswap32(buf+pos+6);
+ ubswap32(buf+pos+10);
pos += sizeof(struct atsc_dcct_test);
for(termidx =0; termidx < test->dcc_term_count; termidx++) {
@@ -50,8 +50,8 @@ struct atsc_dcct_section *atsc_dcct_sect
return NULL;
struct atsc_dcct_term *term = (struct atsc_dcct_term *) (buf+pos);
- bswap64(buf+pos+1);
- bswap16(buf+pos+9);
+ ubswap64(buf+pos+1);
+ ubswap16(buf+pos+9);
pos += sizeof(struct atsc_dcct_term);
if (len < (pos + term->descriptors_length))
@@ -66,7 +66,7 @@ struct atsc_dcct_section *atsc_dcct_sect
return NULL;
struct atsc_dcct_test_part2 *part2 = (struct atsc_dcct_test_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_dcct_test_part2);
if (len < (pos + part2->descriptors_length))
@@ -80,7 +80,7 @@ struct atsc_dcct_section *atsc_dcct_sect
return NULL;
struct atsc_dcct_section_part2 *part2 = (struct atsc_dcct_section_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_dcct_section_part2);
if (len < (pos + part2->descriptors_length))

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-lib_libucsi_atsc_eit__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/eit_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/eit_section.c
@@ -38,9 +38,9 @@ struct atsc_eit_section *atsc_eit_sectio
return NULL;
struct atsc_eit_event *event = (struct atsc_eit_event *) (buf+pos);
- bswap16(buf+pos);
- bswap32(buf+pos+2);
- bswap32(buf+pos+6);
+ ubswap16(buf+pos);
+ ubswap32(buf+pos+2);
+ ubswap32(buf+pos+6);
pos += sizeof(struct atsc_eit_event);
if (len < (pos + event->title_length))
@@ -53,7 +53,7 @@ struct atsc_eit_section *atsc_eit_sectio
return NULL;
struct atsc_eit_event_part2 *part2 = (struct atsc_eit_event_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_eit_event_part2);
if (len < (pos + part2->descriptors_length))

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_atsc_ett__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/ett_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/ett_section.c
@@ -31,7 +31,7 @@ struct atsc_ett_section *atsc_ett_sectio
if (len < sizeof(struct atsc_ett_section))
return NULL;
- bswap32(buf + pos);
+ ubswap32(buf + pos);
pos += 4;
if (atsc_text_validate(buf + pos,

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-lib_libucsi_atsc_mgt__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/mgt_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/mgt_section.c
@@ -32,7 +32,7 @@ struct atsc_mgt_section *atsc_mgt_sectio
if (len < sizeof(struct atsc_mgt_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
// we cannot use the tables_defined value here because of the braindead ATSC spec!
@@ -42,10 +42,10 @@ struct atsc_mgt_section *atsc_mgt_sectio
return NULL;
struct atsc_mgt_table *table = (struct atsc_mgt_table *) (buf+pos);
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap32(buf+pos+5);
- bswap16(buf+pos+9);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap32(buf+pos+5);
+ ubswap16(buf+pos+9);
pos += sizeof(struct atsc_mgt_table);
if ((pos + table->table_type_descriptors_length) > len)
@@ -60,7 +60,7 @@ struct atsc_mgt_section *atsc_mgt_sectio
return NULL;
struct atsc_mgt_section_part2 *part2 = (struct atsc_mgt_section_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct atsc_mgt_section_part2);
if ((pos + part2->descriptors_length) > len)

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-lib_libucsi_atsc_service__location__descriptor.h,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/service_location_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/service_location_descriptor.h
@@ -75,14 +75,14 @@ static inline struct atsc_service_locati
if (d->len < 3)
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos+=3;
for(idx = 0; idx < ret->number_elements; idx++) {
if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
return NULL;
- bswap16(buf+pos+1);
+ ubswap16(buf+pos+1);
pos += sizeof(struct atsc_caption_service_entry);
}

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-lib_libucsi_atsc_stt__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/stt_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/stt_section.c
@@ -30,9 +30,9 @@ struct atsc_stt_section *atsc_stt_sectio
if (len < sizeof(struct atsc_stt_section))
return NULL;
- bswap32(buf + pos);
+ ubswap32(buf + pos);
pos += 5;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if (verify_descriptors(buf + pos, len - sizeof(struct atsc_stt_section)))

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_atsc_time__shifted__service__descriptor.h,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/time_shifted_service_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/time_shifted_service_descriptor.h
@@ -76,8 +76,8 @@ static inline struct atsc_time_shifted_s
if (d->len < (pos + sizeof(struct atsc_time_shifted_service)))
return NULL;
- bswap16(buf+pos);
- bswap24(buf+pos+2);
+ ubswap16(buf+pos);
+ ubswap24(buf+pos+2);
pos += sizeof(struct atsc_time_shifted_service);
}

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-lib_libucsi_atsc_tvct__section.c,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/atsc/tvct_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/atsc/tvct_section.c
@@ -42,13 +42,13 @@ struct atsc_tvct_section *atsc_tvct_sect
pos += 7*2;
- bswap32(buf+pos);
- bswap32(buf+pos+4);
- bswap16(buf+pos+8);
- bswap16(buf+pos+10);
- bswap16(buf+pos+12);
- bswap16(buf+pos+14);
- bswap16(buf+pos+16);
+ ubswap32(buf+pos);
+ ubswap32(buf+pos+4);
+ ubswap16(buf+pos+8);
+ ubswap16(buf+pos+10);
+ ubswap16(buf+pos+12);
+ ubswap16(buf+pos+14);
+ ubswap16(buf+pos+16);
pos+=18;
if ((pos + channel->descriptors_length) > len)
@@ -63,7 +63,7 @@ struct atsc_tvct_section *atsc_tvct_sect
return NULL;
struct atsc_tvct_section_part2 *part2 = (struct atsc_tvct_section_part2 *) (buf+pos);
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=2;
if ((pos + part2->descriptors_length) > len)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_ait__application__descriptor.h,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/dvb/ait_application_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/ait_application_descriptor.h
@@ -99,7 +99,7 @@ static inline struct dvb_ait_application
pos += sizeof(struct dvb_ait_application_descriptor);
pos2 = 0;
while(pos2 < ret->application_profiles_length) {
- bswap16(buf + pos + pos2);
+ ubswap16(buf + pos + pos2);
pos2 += sizeof(struct dvb_ait_application_descriptor);
}
pos += pos2;

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_ait__application__icons__descriptor.h,v 1.1 2011/07/15 22:59:20 jmcneill Exp $
--- lib/libucsi/dvb/ait_application_icons_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/ait_application_icons_descriptor.h
@@ -91,7 +91,7 @@ static inline struct dvb_ait_application
if ((len - pos) < sizeof(struct dvb_ait_application_icons_descriptor_part2))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
return ret;
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_dvb_ait__external__application__authorisation__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h
@@ -66,8 +66,8 @@ static inline struct dvb_ait_external_ap
return NULL;
while(pos < len) {
- bswap32(buf + pos);
- bswap32(buf + pos + 4);
+ ubswap32(buf + pos);
+ ubswap32(buf + pos + 4);
pos += sizeof(struct dvb_ait_external_application_authorisation);
}

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-lib_libucsi_dvb_announcement__support__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/announcement_support_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/announcement_support_descriptor.h
@@ -115,7 +115,7 @@ static inline struct dvb_announcement_su
if (len < (sizeof(struct dvb_announcement_support_descriptor) - 2))
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += 2;
@@ -134,9 +134,9 @@ static inline struct dvb_announcement_su
if ((pos + sizeof(struct dvb_announcement_support_reference)) > len)
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
pos += sizeof(struct dvb_announcement_support_reference);
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_application__signalling__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/application_signalling_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/application_signalling_descriptor.h
@@ -66,7 +66,7 @@ static inline struct dvb_application_sig
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=3;
}

View File

@@ -0,0 +1,35 @@
$NetBSD: patch-lib_libucsi_dvb_bat__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/bat_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/bat_section.c
@@ -31,7 +31,7 @@ struct dvb_bat_section * dvb_bat_section
if (len < sizeof(struct dvb_bat_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if ((pos + ret->bouquet_descriptors_length) > len)
@@ -44,7 +44,7 @@ struct dvb_bat_section * dvb_bat_section
if ((pos + sizeof(struct dvb_bat_section_part2)) > len)
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += sizeof(struct dvb_bat_section_part2);
while (pos < len) {
@@ -54,9 +54,9 @@ struct dvb_bat_section * dvb_bat_section
if ((pos + sizeof(struct dvb_bat_transport)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 2);
- bswap16(buf + pos + 4);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 2);
+ ubswap16(buf + pos + 4);
pos += sizeof(struct dvb_bat_transport);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_ca__identifier__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/ca_identifier_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/ca_identifier_descriptor.h
@@ -56,7 +56,7 @@ static inline struct dvb_ca_identifier_d
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=2;
}

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_dvb_cable__delivery__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/cable_delivery_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/cable_delivery_descriptor.h
@@ -56,9 +56,9 @@ static inline struct dvb_cable_delivery_
if (d->len != (sizeof(struct dvb_cable_delivery_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 6);
- bswap32((uint8_t*) d + 9);
+ ubswap32((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 6);
+ ubswap32((uint8_t*) d + 9);
return (struct dvb_cable_delivery_descriptor*) d;
}

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-lib_libucsi_dvb_cell__frequency__link__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/cell_frequency_link_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/cell_frequency_link_descriptor.h
@@ -78,8 +78,8 @@ static inline struct dvb_cell_frequency_
if ((pos + sizeof(struct dvb_cell_frequency_link_cell)) > len)
return NULL;
- bswap16(buf+pos);
- bswap32(buf+pos+2);
+ ubswap16(buf+pos);
+ ubswap32(buf+pos+2);
pos += sizeof(struct dvb_cell_frequency_link_cell);
@@ -91,7 +91,7 @@ static inline struct dvb_cell_frequency_
pos2 = 0;
while(pos2 < e->subcell_loop_info_length) {
- bswap32(buf+pos+pos2+1);
+ ubswap32(buf+pos+pos2+1);
pos2 += sizeof(struct dvb_cell_frequency_link_cell_subcell);
}

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-lib_libucsi_dvb_cell__list__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/cell_list_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/cell_list_descriptor.h
@@ -84,10 +84,10 @@ static inline struct dvb_cell_list_descr
if ((pos + sizeof(struct dvb_cell_list_entry)) > len)
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
- bswap32(buf+pos+6);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
+ ubswap32(buf+pos+6);
pos += sizeof(struct dvb_cell_list_entry);
@@ -99,9 +99,9 @@ static inline struct dvb_cell_list_descr
pos2 = 0;
while(pos2 < e->subcell_info_loop_length) {
- bswap16(buf+pos+pos2+1);
- bswap16(buf+pos+pos2+3);
- bswap24(buf+pos+pos2+5);
+ ubswap16(buf+pos+pos2+1);
+ ubswap16(buf+pos+pos2+3);
+ ubswap24(buf+pos+pos2+5);
pos2 += sizeof(struct dvb_subcell_list_entry);
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_content__identifier__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/content_identifier_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/content_identifier_descriptor.h
@@ -118,7 +118,7 @@ static inline struct dvb_content_identif
case 1:
if (len < (pos+2))
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
break;
}
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_data__broadcast__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/data_broadcast_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/data_broadcast_descriptor.h
@@ -72,7 +72,7 @@ static inline struct dvb_data_broadcast_
if (pos > len)
return NULL;
- bswap16(buf + 2);
+ ubswap16(buf + 2);
pos += p->selector_length;

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-lib_libucsi_dvb_data__broadcast__id__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/data_broadcast_id_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/data_broadcast_id_descriptor.h
@@ -89,7 +89,7 @@ static inline struct dvb_data_broadcast_
if (d->len < (sizeof(struct dvb_data_broadcast_id_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 2);
return (struct dvb_data_broadcast_id_descriptor*) d;
}
@@ -190,7 +190,7 @@ static inline struct dvb_ip_mac_notifica
if (d->platform_id_data_length == 0)
return NULL;
- bswap32((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
+ ubswap32((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
return (struct dvb_ip_mac_notification_info *) ((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
}
@@ -207,7 +207,7 @@ static inline struct dvb_ip_mac_notifica
if (next >= end)
return NULL;
- bswap32(next);
+ ubswap32(next);
return (struct dvb_ip_mac_notification_info *) next;
}

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-lib_libucsi_dvb_eit__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/eit_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/eit_section.c
@@ -30,9 +30,9 @@ struct dvb_eit_section *dvb_eit_section_
if (len < sizeof(struct dvb_eit_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 4;
while (pos < len) {
@@ -42,8 +42,8 @@ struct dvb_eit_section *dvb_eit_section_
if ((pos + sizeof(struct dvb_eit_event)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 10);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 10);
pos += sizeof(struct dvb_eit_event);

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_frequency__list__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/frequency_list_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/frequency_list_descriptor.h
@@ -69,7 +69,7 @@ static inline struct dvb_frequency_list_
return NULL;
while(pos < len) {
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-lib_libucsi_dvb_int__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/int_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/int_section.c
@@ -32,8 +32,8 @@ struct dvb_int_section * dvb_int_section
if (len < sizeof(struct dvb_int_section))
return NULL;
- bswap32(buf+8);
- bswap16(buf+12);
+ ubswap32(buf+8);
+ ubswap16(buf+12);
pos += 6;
if (len - pos < in->platform_descriptors_length)
@@ -48,7 +48,7 @@ struct dvb_int_section * dvb_int_section
struct dvb_int_target *s2 = (struct dvb_int_target *) (buf + pos);
struct dvb_int_operational_loop *s3;
- bswap16(buf + pos); /* target_descriptor_loop_length swap */
+ ubswap16(buf + pos); /* target_descriptor_loop_length swap */
if (len - pos < s2->target_descriptors_length)
return NULL;
@@ -62,7 +62,7 @@ struct dvb_int_section * dvb_int_section
s3 = (struct dvb_int_operational_loop *) (buf + pos);
- bswap16(buf + pos); /* operational_descriptor_loop_length swap */
+ ubswap16(buf + pos); /* operational_descriptor_loop_length swap */
if (len - pos < s3->operational_descriptors_length)
return NULL;

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-lib_libucsi_dvb_ip__mac__stream__location__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/ip_mac_stream_location_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/ip_mac_stream_location_descriptor.h
@@ -58,10 +58,10 @@ static inline struct dvb_ip_mac_stream_l
if (d->len != (sizeof(struct dvb_ip_mac_stream_location_descriptor) - 2))
return NULL;
- bswap16(buf);
- bswap16(buf+2);
- bswap16(buf+4);
- bswap16(buf+6);
+ ubswap16(buf);
+ ubswap16(buf+2);
+ ubswap16(buf+4);
+ ubswap16(buf+6);
return (struct dvb_ip_mac_stream_location_descriptor*) d;
}

View File

@@ -0,0 +1,52 @@
$NetBSD: patch-lib_libucsi_dvb_linkage__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/linkage_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/linkage_descriptor.h
@@ -144,9 +144,9 @@ static inline struct dvb_linkage_descrip
if (len < (sizeof(struct dvb_linkage_descriptor) - 2))
return NULL;
- bswap16(buf);
- bswap16(buf+2);
- bswap16(buf+4);
+ ubswap16(buf);
+ ubswap16(buf+2);
+ ubswap16(buf+4);
pos += sizeof(struct dvb_linkage_descriptor) - 2;
@@ -164,14 +164,14 @@ static inline struct dvb_linkage_descrip
case 3:
if ((len - pos) < 2)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += 2;
break;
}
if (d08->origin_type == 0) {
if ((len - pos) < 2)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=2;
}
@@ -187,7 +187,7 @@ static inline struct dvb_linkage_descrip
return NULL;
while (pos2 < l_0b->platform_id_data_length) {
- bswap32(buf + pos + pos2);
+ ubswap32(buf + pos + pos2);
struct dvb_platform_id *p_id = (struct dvb_platform_id *) (buf + pos + pos2);
if ((len - pos - pos2) < p_id->platform_name_loop_length)
@@ -207,7 +207,7 @@ static inline struct dvb_linkage_descrip
if (l_0c->table_type == 0x02) {
if ((len - pos) < 2)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
}
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_mhp__data__broadcast__id__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h
@@ -72,7 +72,7 @@ static inline struct dvb_mhp_data_broadc
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=2;
}

View File

@@ -0,0 +1,60 @@
$NetBSD: patch-lib_libucsi_dvb_mosaic__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/mosaic_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/mosaic_descriptor.h
@@ -134,7 +134,7 @@ static inline struct dvb_mosaic_descript
if ((pos + sizeof(struct dvb_mosaic_info)) > len)
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += sizeof(struct dvb_mosaic_info) +
e->elementary_cell_field_length;
@@ -155,35 +155,35 @@ static inline struct dvb_mosaic_descript
case 0x01:
if ((pos + sizeof(struct dvb_mosaic_linkage_01)) > len)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct dvb_mosaic_linkage_01);
break;
case 0x02:
if ((pos + sizeof(struct dvb_mosaic_linkage_02)) > len)
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
pos += sizeof(struct dvb_mosaic_linkage_02);
break;
case 0x03:
if ((pos + sizeof(struct dvb_mosaic_linkage_03)) > len)
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
pos += sizeof(struct dvb_mosaic_linkage_03);
break;
case 0x04:
if ((pos + sizeof(struct dvb_mosaic_linkage_04)) > len)
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
- bswap16(buf+pos+6);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
+ ubswap16(buf+pos+6);
pos += sizeof(struct dvb_mosaic_linkage_04);
break;
}

View File

@@ -0,0 +1,35 @@
$NetBSD: patch-lib_libucsi_dvb_nit__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/nit_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/nit_section.c
@@ -31,7 +31,7 @@ struct dvb_nit_section *dvb_nit_section_
if (len < sizeof(struct dvb_nit_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if ((pos + ret->network_descriptors_length) > len)
@@ -45,7 +45,7 @@ struct dvb_nit_section *dvb_nit_section_
if ((pos + sizeof(struct dvb_nit_section_part2)) > len)
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
while (pos < len) {
@@ -55,9 +55,9 @@ struct dvb_nit_section *dvb_nit_section_
if ((pos + sizeof(struct dvb_nit_transport)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 2);
- bswap16(buf + pos + 4);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 2);
+ ubswap16(buf + pos + 4);
pos += sizeof(struct dvb_nit_transport);

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_dvb_nvod__reference__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/nvod_reference_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/nvod_reference_descriptor.h
@@ -65,9 +65,9 @@ static inline struct dvb_nvod_reference_
return NULL;
while(pos < len) {
- bswap16(buf+pos);
- bswap16(buf+pos+2);
- bswap16(buf+pos+4);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
+ ubswap16(buf+pos+4);
pos += sizeof(struct dvb_nvod_reference);
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_partial__transport__stream__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/partial_transport_stream_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/partial_transport_stream_descriptor.h
@@ -56,7 +56,7 @@ static inline struct dvb_partial_transpo
if (d->len != (sizeof(struct dvb_partial_transport_stream_descriptor) - 2))
return NULL;
- bswap64((uint8_t*) d + 2);
+ ubswap64((uint8_t*) d + 2);
return (struct dvb_partial_transport_stream_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_pdc__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/pdc_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/pdc_descriptor.h
@@ -52,7 +52,7 @@ static inline struct dvb_pdc_descriptor*
if (d->len != (sizeof(struct dvb_pdc_descriptor) - 2))
return NULL;
- bswap24((uint8_t*) d + 2);
+ ubswap24((uint8_t*) d + 2);
return (struct dvb_pdc_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_private__data__specifier__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/private_data_specifier_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/private_data_specifier_descriptor.h
@@ -51,7 +51,7 @@ static inline struct dvb_private_data_sp
if (d->len != (sizeof(struct dvb_private_data_specifier_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct dvb_private_data_specifier_descriptor*) d;
}

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_dvb_rnt__rar__over__dvb__stream__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h
@@ -75,9 +75,9 @@ static inline struct dvb_rnt_rar_over_dv
if (len < sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor))
return NULL;
- bswap16(buf + 13);
- bswap16(buf + 15);
- bswap16(buf + 17);
+ ubswap16(buf + 13);
+ ubswap16(buf + 15);
+ ubswap16(buf + 17);
if (ret->scheduled_flag == 1) {
if (len < (sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor)+

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_dvb_rnt__rnt__scan__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/rnt_rnt_scan_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/rnt_rnt_scan_descriptor.h
@@ -66,8 +66,8 @@ static inline struct dvb_rnt_rnt_scan_de
return NULL;
while(pos < len) {
- bswap16(buf+pos);
- bswap16(buf+pos+2);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
pos += sizeof(struct dvb_rnt_rnt_scan_entry);
}

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-lib_libucsi_dvb_rst__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/rst_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/rst_section.c
@@ -32,10 +32,10 @@ struct dvb_rst_section * dvb_rst_section
if ((pos + sizeof(struct dvb_rst_status)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 2);
- bswap16(buf + pos + 4);
- bswap16(buf + pos + 6);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 2);
+ ubswap16(buf + pos + 4);
+ ubswap16(buf + pos + 6);
pos += sizeof(struct dvb_rst_status);
}

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_dvb_satellite__delivery__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/satellite_delivery_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/satellite_delivery_descriptor.h
@@ -59,9 +59,9 @@ static inline struct dvb_satellite_deliv
if (d->len < (sizeof(struct dvb_satellite_delivery_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 6);
- bswap32((uint8_t*) d + 9);
+ ubswap32((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 6);
+ ubswap32((uint8_t*) d + 9);
return (struct dvb_satellite_delivery_descriptor*) d;
}

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-lib_libucsi_dvb_sdt__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/sdt_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/sdt_section.c
@@ -30,7 +30,7 @@ struct dvb_sdt_section * dvb_sdt_section
if (len < sizeof(struct dvb_sdt_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 3;
while (pos < len) {
@@ -40,8 +40,8 @@ struct dvb_sdt_section * dvb_sdt_section
if ((pos + sizeof(struct dvb_sdt_service)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 3);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 3);
pos += sizeof(struct dvb_sdt_service);
if ((pos + service->descriptors_loop_length) > len)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_service__availability__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/service_availability_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/service_availability_descriptor.h
@@ -60,7 +60,7 @@ static inline struct dvb_service_availab
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += 2;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_service__list__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/service_list_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/service_list_descriptor.h
@@ -64,7 +64,7 @@ static inline struct dvb_service_list_de
return NULL;
while(pos < len) {
- bswap16(p+pos);
+ ubswap16(p+pos);
pos += sizeof(struct dvb_service_list_service);
}

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_dvb_service__move__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/service_move_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/service_move_descriptor.h
@@ -53,9 +53,9 @@ static inline struct dvb_service_move_de
if (d->len != (sizeof(struct dvb_service_move_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 4);
- bswap16((uint8_t*) d + 6);
+ ubswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 4);
+ ubswap16((uint8_t*) d + 6);
return (struct dvb_service_move_descriptor*) d;
}

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-lib_libucsi_dvb_sit__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/sit_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/sit_section.c
@@ -31,7 +31,7 @@ struct dvb_sit_section * dvb_sit_section
if (len < sizeof(struct dvb_sit_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if ((pos + ret->transmission_info_loop_length) > len)
@@ -48,9 +48,9 @@ struct dvb_sit_section * dvb_sit_section
if ((pos + sizeof(struct dvb_sit_service)) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 2);
- bswap16(buf + pos + 4);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 2);
+ ubswap16(buf + pos + 4);
pos += sizeof(struct dvb_sit_service);
if ((pos + service->service_loop_length) > len)

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_dvb_subtitling__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/subtitling_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/subtitling_descriptor.h
@@ -67,8 +67,8 @@ static inline struct dvb_subtitling_desc
return NULL;
while(pos < len) {
- bswap16(ptr+pos+4);
- bswap16(ptr+pos+6);
+ ubswap16(ptr+pos+4);
+ ubswap16(ptr+pos+6);
pos += sizeof(struct dvb_subtitling_entry);
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_dvb_terrestrial__delivery__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/terrestrial_delivery_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/terrestrial_delivery_descriptor.h
@@ -64,8 +64,8 @@ static inline struct dvb_terrestrial_del
if (d->len != (sizeof(struct dvb_terrestrial_delivery_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
- bswap32((uint8_t*) d + 9);
+ ubswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 9);
return (struct dvb_terrestrial_delivery_descriptor*) d;
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_dvb_time__shifted__event__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/time_shifted_event_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/time_shifted_event_descriptor.h
@@ -52,8 +52,8 @@ static inline struct dvb_time_shifted_ev
if (d->len != (sizeof(struct dvb_time_shifted_event_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 4);
+ ubswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 4);
return (struct dvb_time_shifted_event_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_time__shifted__service__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/time_shifted_service_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/time_shifted_service_descriptor.h
@@ -51,7 +51,7 @@ static inline struct dvb_time_shifted_se
if (d->len != (sizeof(struct dvb_time_shifted_service_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 2);
return (struct dvb_time_shifted_service_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_tot__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/tot_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/tot_section.c
@@ -32,7 +32,7 @@ struct dvb_tot_section *dvb_tot_section_
return NULL;
pos += 5;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if ((pos + ret->descriptors_loop_length) > len)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_dvb_tva__id__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/dvb/tva_id_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/dvb/tva_id_descriptor.h
@@ -66,7 +66,7 @@ static inline struct dvb_tva_id_descript
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=3;
}

View File

@@ -0,0 +1,94 @@
$NetBSD: patch-lib_libucsi_endianops.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/endianops.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/endianops.h
@@ -27,8 +27,14 @@ extern "C"
#endif
#include <stdint.h>
+#ifdef __NetBSD__
+#define bswap_16 bswap16
+#define bswap_32 bswap32
+#define bswap_64 bswap64
+#else
#include <byteswap.h>
#include <endian.h>
+#endif
#define __ucsi_packed __attribute__((packed))
@@ -44,27 +50,27 @@ extern "C"
#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x1 x2 x3 x4 x5 x6 x7
#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x1 x2 x3 x4 x5 x6 x7 x8
-static inline void bswap16(uint8_t *buf) {
+static inline void ubswap16(uint8_t *buf) {
(void) buf;
}
-static inline void bswap32(uint8_t *buf) {
+static inline void ubswap32(uint8_t *buf) {
(void) buf;
}
-static inline void bswap64(uint8_t *buf) {
+static inline void ubswap64(uint8_t *buf) {
(void) buf;
}
-static inline void bswap24(uint8_t *buf) {
+static inline void ubswap24(uint8_t *buf) {
(void) buf;
}
-static inline void bswap40(uint8_t *buf) {
+static inline void ubswap40(uint8_t *buf) {
(void) buf;
}
-static inline void bswap48(uint8_t *buf) {
+static inline void ubswap48(uint8_t *buf) {
(void) buf;
}
@@ -77,26 +83,26 @@ static inline void bswap48(uint8_t *buf)
#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x7 x6 x5 x4 x3 x2 x1
#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x8 x7 x6 x5 x4 x3 x2 x1
-static inline void bswap16(uint8_t * buf) {
+static inline void ubswap16(uint8_t * buf) {
*((uint16_t*)buf) = bswap_16((*(uint16_t*)buf));
}
-static inline void bswap32(uint8_t * buf) {
+static inline void ubswap32(uint8_t * buf) {
*((uint32_t*)buf) = bswap_32((*(uint32_t*)buf));
}
-static inline void bswap64(uint8_t * buf) {
+static inline void ubswap64(uint8_t * buf) {
*((uint64_t*)buf) = bswap_64((*(uint64_t*)buf));
}
-static inline void bswap24(uint8_t * buf) {
+static inline void ubswap24(uint8_t * buf) {
uint8_t tmp0 = buf[0];
buf[0] = buf[2];
buf[2] = tmp0;
}
-static inline void bswap40(uint8_t * buf) {
+static inline void ubswap40(uint8_t * buf) {
uint8_t tmp0 = buf[0];
uint8_t tmp1 = buf[1];
@@ -106,7 +112,7 @@ static inline void bswap40(uint8_t * buf
buf[4] = tmp0;
}
-static inline void bswap48(uint8_t * buf) {
+static inline void ubswap48(uint8_t * buf) {
uint8_t tmp0 = buf[0];
uint8_t tmp1 = buf[1];
uint8_t tmp2 = buf[2];

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_mpeg_ca__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/ca_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/ca_descriptor.h
@@ -54,8 +54,8 @@ static inline struct mpeg_ca_descriptor*
if (d->len < (sizeof(struct mpeg_ca_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 4);
+ ubswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 4);
return (struct mpeg_ca_descriptor*) d;
}

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-lib_libucsi_mpeg_content__labelling__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/content_labelling_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/content_labelling_descriptor.h
@@ -124,14 +124,14 @@ static inline struct mpeg_content_labell
if (len < sizeof(struct mpeg_content_labelling_descriptor))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
id = *((uint16_t*) (buf+pos));
pos += 2;
if (id == 0xffff) {
if (len < (pos+4))
return NULL;
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}
@@ -152,8 +152,8 @@ static inline struct mpeg_content_labell
(flags->content_time_base_indicator == 2)) {
if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_time_base)))
return NULL;
- bswap40(buf+pos);
- bswap40(buf+pos+5);
+ ubswap40(buf+pos);
+ ubswap40(buf+pos+5);
pos += sizeof(struct mpeg_content_labelling_descriptor_time_base);
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_copyright__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/copyright_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/copyright_descriptor.h
@@ -52,7 +52,7 @@ static inline struct mpeg_copyright_desc
if (d->len < (sizeof(struct mpeg_copyright_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct mpeg_copyright_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_external__es__id__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/external_es_id_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/external_es_id_descriptor.h
@@ -51,7 +51,7 @@ static inline struct mpeg_external_es_id
if (d->len != (sizeof(struct mpeg_external_es_id_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 2);
return (struct mpeg_external_es_id_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_fmc__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/fmc_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/fmc_descriptor.h
@@ -64,7 +64,7 @@ static inline struct mpeg_fmc_descriptor
return NULL;
while(pos < len) {
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct mpeg_flex_mux);
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_ibp__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/ibp_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/ibp_descriptor.h
@@ -53,7 +53,7 @@ static inline struct mpeg_ibp_descriptor
if (d->len != (sizeof(struct mpeg_ibp_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 2);
return (struct mpeg_ibp_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_maximum__bitrate__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/maximum_bitrate_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/maximum_bitrate_descriptor.h
@@ -52,7 +52,7 @@ static inline struct mpeg_maximum_bitrat
if (d->len != (sizeof(struct mpeg_maximum_bitrate_descriptor) - 2))
return NULL;
- bswap24((uint8_t*) d + 2);
+ ubswap24((uint8_t*) d + 2);
return (struct mpeg_maximum_bitrate_descriptor*) d;
}

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-lib_libucsi_mpeg_metadata__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/metadata_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/metadata_descriptor.h
@@ -144,14 +144,14 @@ static inline struct mpeg_metadata_descr
if (len < sizeof(struct mpeg_metadata_descriptor))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
id = *((uint16_t*) (buf+pos));
pos += 2;
if (id == 0xffff) {
if (len < (pos+4))
return NULL;
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}
@@ -163,7 +163,7 @@ static inline struct mpeg_metadata_descr
if (id == 0xff) {
if (len < (pos+4))
return NULL;
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-lib_libucsi_mpeg_metadata__pointer__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/metadata_pointer_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/metadata_pointer_descriptor.h
@@ -125,14 +125,14 @@ static inline struct mpeg_metadata_point
if (len < sizeof(struct mpeg_metadata_pointer_descriptor))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
id = *((uint16_t*) (buf+pos));
pos += 2;
if (id == 0xffff) {
if (len < (pos+4))
return NULL;
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}
@@ -144,7 +144,7 @@ static inline struct mpeg_metadata_point
if (id == 0xff) {
if (len < (pos+4))
return NULL;
- bswap32(buf+pos);
+ ubswap32(buf+pos);
pos += 4;
}
@@ -164,15 +164,15 @@ static inline struct mpeg_metadata_point
if (flags->mpeg_carriage_flags < 3) {
if (len < (pos + 2))
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += 2;
}
if (flags->mpeg_carriage_flags == 1) {
if (len < (pos + 4))
return NULL;
- bswap16(buf+pos);
- bswap16(buf+pos+2);
+ ubswap16(buf+pos);
+ ubswap16(buf+pos+2);
pos += 4;
}

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-lib_libucsi_mpeg_metadata__std__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/metadata_std_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/metadata_std_descriptor.h
@@ -58,9 +58,9 @@ static inline struct mpeg_metadata_std_d
if (d->len != (sizeof(struct mpeg_metadata_std_descriptor) - 2))
return NULL;
- bswap24(buf + 2);
- bswap24(buf + 5);
- bswap24(buf + 8);
+ ubswap24(buf + 2);
+ ubswap24(buf + 5);
+ ubswap24(buf + 8);
return (struct mpeg_metadata_std_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_multiplex__buffer__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/multiplex_buffer_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/multiplex_buffer_descriptor.h
@@ -53,7 +53,7 @@ static inline struct mpeg_multiplex_buff
if (d->len != (sizeof(struct mpeg_multiplex_buffer_descriptor) - 2))
return NULL;
- bswap48((uint8_t*) d + 2);
+ ubswap48((uint8_t*) d + 2);
return (struct mpeg_multiplex_buffer_descriptor*) d;
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_mpeg_multiplex__buffer__utilization__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h
@@ -54,8 +54,8 @@ static inline struct mpeg_multiplex_buff
if (d->len != (sizeof(struct mpeg_multiplex_buffer_utilization_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
- bswap16((uint8_t*) d + 4);
+ ubswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 4);
return (struct mpeg_multiplex_buffer_utilization_descriptor*) d;
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-lib_libucsi_mpeg_odsmt__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/odsmt_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/odsmt_section.c
@@ -41,7 +41,7 @@ struct mpeg_odsmt_section *mpeg_odsmt_se
if ((pos + sizeof(struct mpeg_odsmt_stream_single)) > len)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos+=3;
if ((pos + stream->u.single.es_info_length) >= len)
@@ -59,7 +59,7 @@ struct mpeg_odsmt_section *mpeg_odsmt_se
if ((pos + sizeof(struct mpeg_odsmt_stream_multi)) > len)
return NULL;
- bswap16(buf+pos);
+ ubswap16(buf+pos);
pos += sizeof(struct mpeg_odsmt_stream_multi);
if ((pos + stream->u.multi.es_info_length) > len)

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-lib_libucsi_mpeg_pat__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/pat_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/pat_section.c
@@ -34,8 +34,8 @@ struct mpeg_pat_section *mpeg_pat_sectio
if ((pos + 4) > len)
return NULL;
- bswap16(buf + pos);
- bswap16(buf + pos + 2);
+ ubswap16(buf + pos);
+ ubswap16(buf + pos + 2);
pos += 4;
}

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-lib_libucsi_mpeg_pmt__section.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/pmt_section.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/pmt_section.c
@@ -31,9 +31,9 @@ struct mpeg_pmt_section * mpeg_pmt_secti
if (len < sizeof(struct mpeg_pmt_section))
return NULL;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
- bswap16(buf + pos);
+ ubswap16(buf + pos);
pos += 2;
if ((pos + pmt->program_info_length) > len)
@@ -51,8 +51,8 @@ struct mpeg_pmt_section * mpeg_pmt_secti
if ((pos + sizeof(struct mpeg_pmt_stream)) > len)
return NULL;
- bswap16(buf + pos + 1);
- bswap16(buf + pos + 3);
+ ubswap16(buf + pos + 1);
+ ubswap16(buf + pos + 3);
pos += sizeof(struct mpeg_pmt_stream);
if ((pos + stream->es_info_length) > len)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_private__data__indicator__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/private_data_indicator_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/private_data_indicator_descriptor.h
@@ -51,7 +51,7 @@ static inline struct mpeg_private_data_i
if (d->len != (sizeof(struct mpeg_private_data_indicator_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct mpeg_private_data_indicator_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_registration__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/registration_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/registration_descriptor.h
@@ -52,7 +52,7 @@ static inline struct mpeg_registration_d
if (d->len < (sizeof(struct mpeg_registration_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct mpeg_registration_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_sl__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/sl_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/sl_descriptor.h
@@ -51,7 +51,7 @@ static inline struct mpeg_sl_descriptor*
if (d->len != (sizeof(struct mpeg_sl_descriptor) - 2))
return NULL;
- bswap16((uint8_t*) d + 2);
+ ubswap16((uint8_t*) d + 2);
return (struct mpeg_sl_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_smoothing__buffer__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/smoothing_buffer_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/smoothing_buffer_descriptor.h
@@ -54,7 +54,7 @@ static inline struct mpeg_smoothing_buff
if (d->len != (sizeof(struct mpeg_smoothing_buffer_descriptor) - 2))
return NULL;
- bswap48((uint8_t*) d + 2);
+ ubswap48((uint8_t*) d + 2);
return (struct mpeg_smoothing_buffer_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_target__background__grid__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/target_background_grid_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/target_background_grid_descriptor.h
@@ -54,7 +54,7 @@ static inline struct mpeg_target_backgro
if (d->len != (sizeof(struct mpeg_target_background_grid_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct mpeg_target_background_grid_descriptor*) d;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-lib_libucsi_mpeg_video__window__descriptor.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/mpeg/video_window_descriptor.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/mpeg/video_window_descriptor.h
@@ -52,7 +52,7 @@ static inline struct mpeg_video_window_d
if (d->len != (sizeof(struct mpeg_video_window_descriptor) - 2))
return NULL;
- bswap32((uint8_t*) d + 2);
+ ubswap32((uint8_t*) d + 2);
return (struct mpeg_video_window_descriptor*) d;
}

View File

@@ -0,0 +1,60 @@
$NetBSD: patch-lib_libucsi_section.h,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- lib/libucsi/section.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ lib/libucsi/section.h
@@ -112,7 +112,7 @@ static inline struct section * section_c
if (len < 3)
return NULL;
- bswap16(buf+1);
+ ubswap16(buf+1);
if (len != ret->length + 3U)
return NULL;
@@ -134,9 +134,9 @@ static inline int section_check_crc(stru
uint32_t crc;
/* the crc check has to be performed on the unswapped data */
- bswap16(buf+1);
+ ubswap16(buf+1);
crc = crc32(CRC32_INIT, buf, len);
- bswap16(buf+1);
+ ubswap16(buf+1);
/* the crc check includes the crc value,
* the result should therefore be zero.
@@ -165,7 +165,7 @@ static inline struct section_ext * secti
return NULL;
}
- bswap16((uint8_t *)section + sizeof(struct section));
+ ubswap16((uint8_t *)section + sizeof(struct section));
return (struct section_ext *)section;
}
@@ -183,7 +183,7 @@ static inline struct section_ext * secti
if (section->syntax_indicator == 0)
return NULL;
- bswap16((uint8_t *)section + sizeof(struct section));
+ ubswap16((uint8_t *)section + sizeof(struct section));
if (update_crc) {
uint8_t * buf = (uint8_t *) section;
@@ -191,13 +191,13 @@ static inline struct section_ext * secti
uint32_t crc;
/* the crc has to be performed on the swapped data */
- bswap16(buf+1);
+ ubswap16(buf+1);
crc = crc32(CRC32_INIT, buf, len-4);
- bswap16(buf+1);
+ ubswap16(buf+1);
/* update the CRC */
*((uint32_t*) (buf+len-4)) = crc;
- bswap32(buf+len-4);
+ ubswap32(buf+len-4);
}
return (struct section_ext *)section;

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-util_atsc__epg_Makefile,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/atsc_epg/Makefile.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/atsc_epg/Makefile
@@ -4,10 +4,10 @@ binaries = atsc_epg
inst_bin = $(binaries)
-CPPFLAGS += -I../../lib -std=c99 -D_POSIX_SOURCE
+CPPFLAGS += -I../../lib -std=c99 -D_POSIX_SOURCE -D_NETBSD_SOURCE
#LDFLAGS += -static -L../../lib/libdvbapi -L../../lib/libucsi
LDFLAGS += -L../../lib/libdvbapi -L../../lib/libucsi
-LDLIBS += -ldvbapi -lucsi
+LDLIBS += -ldvbapi -lucsi -Wl,-R$(prefix)/lib
.PHONY: all

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-util_dvbdate_Makefile,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/dvbdate/Makefile.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/dvbdate/Makefile
@@ -6,7 +6,7 @@ inst_bin = $(binaries)
CPPFLAGS += -I../../lib
LDFLAGS += -L../../lib/libdvbapi -L../../lib/libucsi
-LDLIBS += -ldvbapi -lucsi
+LDLIBS += -ldvbapi -lucsi -Wl,-R$(prefix)/lib
.PHONY: all

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-util_dvbdate_dvbdate.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/dvbdate/dvbdate.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/dvbdate/dvbdate.c
@@ -309,7 +309,12 @@ int atsc_scan_date(time_t *rx_time, unsi
*/
int set_time(time_t * new_time)
{
+#ifdef __NetBSD__
+ struct timeval new_tv = { .tv_sec = new_time, .tv_usec = 0 };
+ if (settimeofday(&new_tv, NULL)) {
+#else
if (stime(new_time)) {
+#endif
perror("Unable to set time");
return -1;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-util_scan_diseqc.c,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/diseqc.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/diseqc.c
@@ -1,4 +1,8 @@
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
#include <sys/ioctl.h>
#include <time.h>

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-util_scan_diseqc.h,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/diseqc.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/diseqc.h
@@ -2,7 +2,11 @@
#define __DISEQC_H__
#include <stdint.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
struct diseqc_cmd {

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-util_scan_dump-vdr.c,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/dump-vdr.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/dump-vdr.c
@@ -1,6 +1,10 @@
#include <stdio.h>
#include "dump-vdr.h"
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
static const char *inv_name [] = {

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-util_scan_dump-vdr.h,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/dump-vdr.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/dump-vdr.h
@@ -2,7 +2,11 @@
#define __DUMP_VDR_H__
#include <stdint.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
extern
void vdr_dump_dvb_parameters (FILE *f, fe_type_t type,

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-util_scan_dump-zap.c,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/dump-zap.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/dump-zap.c
@@ -1,5 +1,9 @@
#include <stdio.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
#include "dump-zap.h"
static const char *inv_name [] = {

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-util_scan_dump-zap.h,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/dump-zap.h.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/dump-zap.h
@@ -2,7 +2,11 @@
#define __DUMP_ZAP_H__
#include <stdint.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
+#endif
extern void zap_dump_dvb_parameters (FILE *f, fe_type_t type,
struct dvb_frontend_parameters *t, char polarity, int sat);

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-util_scan_lnb.c,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/lnb.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/lnb.c
@@ -1,7 +1,11 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifdef __linux__
#include <linux/types.h>
+#else
+#include <sys/types.h>
+#endif
#include "lnb.h"
static char *univ_desc[] = {

View File

@@ -0,0 +1,46 @@
$NetBSD: patch-util_scan_scan.c,v 1.1.1.1 2011/07/13 23:42:16 jmcneill Exp $
--- util/scan/scan.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/scan/scan.c
@@ -36,8 +36,12 @@
#include <iconv.h>
#include <langinfo.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
+#endif
#include "list.h"
#include "diseqc.h"
@@ -71,7 +75,11 @@ static int unique_anon_services;
char *default_charset = "ISO-6937";
char *output_charset;
+#ifdef __NetBSD__
+#define CS_OPTIONS ""
+#else
#define CS_OPTIONS "//TRANSLIT"
+#endif
static enum fe_spectral_inversion spectral_inversion = INVERSION_AUTO;
@@ -1455,7 +1463,7 @@ static void parse_psip_vct (const unsign
if (s->service_name)
free(s->service_name);
- s->service_name = malloc(7*sizeof(unsigned char));
+ s->service_name = malloc(8*sizeof(unsigned char));
/* TODO find a better solution to convert UTF-16 */
s->service_name[0] = ch.short_name0;
s->service_name[1] = ch.short_name1;
@@ -1464,6 +1472,7 @@ static void parse_psip_vct (const unsign
s->service_name[4] = ch.short_name4;
s->service_name[5] = ch.short_name5;
s->service_name[6] = ch.short_name6;
+ s->service_name[7] = '\0';
parse_psip_descriptors(s,&b[32],ch.descriptors_length);

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-util_szap_azap.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/szap/azap.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/szap/azap.c
@@ -10,8 +10,12 @@
#include <ctype.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
+#endif
#include "util.h"

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-util_szap_czap.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/szap/czap.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/szap/czap.c
@@ -10,8 +10,12 @@
#include <ctype.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
+#endif
#include "util.h"

View File

@@ -0,0 +1,29 @@
$NetBSD: patch-util_szap_szap.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/szap/szap.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/szap/szap.c
@@ -44,9 +44,13 @@
#include <stdint.h>
#include <sys/time.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
#include <linux/dvb/audio.h>
+#endif
#include "lnb.h"
#include "util.h"
@@ -304,8 +308,10 @@ int zap_to(unsigned int adapter, unsigne
if (diseqc(fefd, sat_no, pol, hiband))
if (do_tune(fefd, ifreq, sr))
if (set_pesfilter(dmxfdv, vpid, DMX_PES_VIDEO, dvr))
+#ifdef AUDIO_SET_BYPASS_MODE
if (audiofd >= 0)
(void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass);
+#endif
if (set_pesfilter(dmxfda, apid, DMX_PES_AUDIO, dvr)) {
if (rec_psi) {
pmtpid = get_pmt_pid(dmxdev, sid);

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-util_szap_tzap.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/szap/tzap.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/szap/tzap.c
@@ -32,8 +32,16 @@
#include <errno.h>
#include <signal.h>
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
+#endif
#include "util.h"

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-util_szap_util.c,v 1.1 2011/07/15 22:59:21 jmcneill Exp $
--- util/szap/util.c.orig 2011-06-28 05:50:24.000000000 +0000
+++ util/szap/util.c
@@ -29,8 +29,12 @@
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef __NetBSD__
+#include <dev/dtv/dtvio.h>
+#else
#include <linux/dvb/frontend.h>
#include <linux/dvb/dmx.h>
+#endif
int set_pesfilter(int dmxfd, int pid, int pes_type, int dvr)