cd-discid: pick up rest of OSX-relevant patch for 1.4
Fixes Homebrew/homebrew#46267 Closes Homebrew/homebrew#47880. Signed-off-by: Andrew Janke <andrew@apjanke.net>
This commit is contained in:
parent
1ae3491298
commit
87b7f6874f
1 changed files with 27 additions and 2 deletions
|
@ -4,7 +4,7 @@ class CdDiscid < Formula
|
|||
url "http://linukz.org/download/cd-discid-1.4.tar.gz"
|
||||
mirror "https://mirrors.kernel.org/debian/pool/main/c/cd-discid/cd-discid_1.4.orig.tar.gz"
|
||||
sha256 "ffd68cd406309e764be6af4d5cbcc309e132c13f3597c6a4570a1f218edd2c63"
|
||||
revision 1
|
||||
revision 2
|
||||
head "https://github.com/taem/cd-discid.git"
|
||||
|
||||
stable do
|
||||
|
@ -33,7 +33,7 @@ end
|
|||
|
||||
__END__
|
||||
diff --git a/cd-discid.c b/cd-discid.c
|
||||
index 9b0b40a..1a0a594 100644
|
||||
index 9b0b40a..2c96641 100644
|
||||
--- a/cd-discid.c
|
||||
+++ b/cd-discid.c
|
||||
@@ -93,7 +93,7 @@
|
||||
|
@ -45,3 +45,28 @@ index 9b0b40a..1a0a594 100644
|
|||
|
||||
#else
|
||||
#error "Your OS isn't supported yet."
|
||||
@@ -236,8 +236,7 @@ int main(int argc, char *argv[])
|
||||
* TocEntry[last-1].lastRecordedAddress + 1, so we compute the start
|
||||
* of leadout from the start+length of the last track instead
|
||||
*/
|
||||
- TocEntry[last].cdte_track_address = TocEntry[last - 1].trackSize +
|
||||
- TocEntry[last - 1].trackStartAddress;
|
||||
+TocEntry[last].cdte_track_address = htonl(ntohl(TocEntry[last-1].trackSize) + ntohl(TocEntry[last-1].trackStartAddress));
|
||||
#else /* FreeBSD, Linux, Solaris */
|
||||
for (i = 0; i < last; i++) {
|
||||
/* tracks start with 1, but I must start with 0 on OpenBSD */
|
||||
@@ -260,12 +259,12 @@ int main(int argc, char *argv[])
|
||||
/* release file handle */
|
||||
close(drive);
|
||||
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
|
||||
TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < last; i++) {
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
|
||||
TocEntry[i].cdte_track_address = ntohl(TocEntry[i].cdte_track_address);
|
||||
#endif
|
||||
cksum += cddb_sum((TocEntry[i].cdte_track_address + CD_MSF_OFFSET) / CD_FRAMES);
|
||||
|
|
Loading…
Reference in a new issue