diff options
author | wiz <wiz@pkgsrc.org> | 2014-01-09 10:25:14 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-01-09 10:25:14 +0000 |
commit | 7ede993fc7806414605984c127fe6c139a7c7fcf (patch) | |
tree | 7f5b2e4baed0a59c13d9e3ec828a7f93f5beaa17 /multimedia/libbdplus/patches | |
parent | ca1cdf62e254ca3c6f72ae5ff3d91ee27d9727d9 (diff) | |
download | pkgsrc-7ede993fc7806414605984c127fe6c139a7c7fcf.tar.gz |
Cleaner patches.
Diffstat (limited to 'multimedia/libbdplus/patches')
-rw-r--r-- | multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_segment.c | 31 | ||||
-rw-r--r-- | multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_trap.c | 22 |
2 files changed, 24 insertions, 29 deletions
diff --git a/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_segment.c b/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_segment.c index 7c8ead5a514..09effadd632 100644 --- a/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_segment.c +++ b/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_segment.c @@ -1,24 +1,17 @@ -$NetBSD: patch-src_libbdplus_bdsvm_segment.c,v 1.1 2014/01/08 23:07:09 wiz Exp $ +$NetBSD: patch-src_libbdplus_bdsvm_segment.c,v 1.2 2014/01/09 10:25:14 wiz Exp $ -fseeko is a Linuxism. +Fix build on systems without fseeko. --- src/libbdplus/bdsvm/segment.c.orig 2013-12-18 12:13:09.000000000 +0000 +++ src/libbdplus/bdsvm/segment.c -@@ -950,7 +950,7 @@ int32_t segment_patchfile(conv_table_t * - offset); - } +@@ -38,6 +38,10 @@ + # define fseeko fseeko64 + #endif -- if (fseeko(fd, offset, SEEK_SET)) { -+ if (fseek(fd, offset, SEEK_SET)) { - printf("Seek to offset %"PRIx64" failed. Stopping at table %d, segment %d, entry %d.\n", - offset, table, currseg, currentry); - return -1; -@@ -975,7 +975,7 @@ int32_t segment_patchfile(conv_table_t * - offset); - } - -- if (fseeko(fd, offset, SEEK_SET)) { -+ if (fseek(fd, offset, SEEK_SET)) { - printf("Seek to offset %"PRIx64" failed. Stopping at table %d, segment %d, entry %d.\n", - offset, table, currseg, currentry); - return -1; ++#ifndef fseeko ++#define fseeko fseek ++#endif ++ + /* + * + */ diff --git a/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_trap.c b/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_trap.c index ffda463e556..1f8b4ebb065 100644 --- a/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_trap.c +++ b/multimedia/libbdplus/patches/patch-src_libbdplus_bdsvm_trap.c @@ -1,15 +1,17 @@ -$NetBSD: patch-src_libbdplus_bdsvm_trap.c,v 1.1 2014/01/08 23:07:09 wiz Exp $ +$NetBSD: patch-src_libbdplus_bdsvm_trap.c,v 1.2 2014/01/09 10:25:14 wiz Exp $ -fseeko is a Linuxism. +Fix build on systems without fseeko. --- src/libbdplus/bdsvm/trap.c.orig 2013-12-18 12:13:09.000000000 +0000 +++ src/libbdplus/bdsvm/trap.c -@@ -1310,7 +1310,7 @@ uint32_t TRAP_MediaCheck(const char *dev - return j; - } +@@ -54,6 +54,10 @@ + # define fseeko fseeko64 + #endif -- if (fseeko(fd, seek, SEEK_SET)) { -+ if (fseek(fd, seek, SEEK_SET)) { - DEBUG(DBG_BDPLUS|DBG_CRIT, "[TRAP] TRAP_MediaCheck: failed to seek %s to %"PRIu64"\n", (char *)FileName, seek); - fclose(fd); - return STATUS_INVALID_PARAMETER; ++#ifndef fseeko ++#define fseeko fseek ++#endif ++ + /* Set this in CFLAGS to debug gcrypt MPIs and S-expressions */ + #ifndef GCRYPT_DEBUG + #define GCRYPT_DEBUG 0 |