summaryrefslogtreecommitdiff
path: root/multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2006-01-07 00:43:19 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2006-01-07 00:43:19 +0000
commitf0098e5d43ff45de875782aecde303e7bc25f738 (patch)
tree54a9a0ebad2a1b8e7d514e21060bc3b1db4c75e8 /multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp
parentIt seemed that the 4.x build was generating more files than the 6.x build. (diff)
[UPDATE PORT] multimedia/k9copy
This is port update for newer 1.0.2 version of k9copy. Previous port version don't build on 4.x due to missing stdint.h so in this version of port every include of stdint.h wrapped with ifdef falling back to inttypes.h where stdint.h isn't availible and inttypes.h present. So now k9copy should be buildable on 4.x. I cant check it cause I do not have any 4.x box around. PR: ports/91356 Submitted by: Alexander V. Ribchansky <triosoft@triosoft.com.ua>
Diffstat (limited to 'multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp')
-rw-r--r--multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp b/multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp
new file mode 100644
index 000000000000..a572bba7a38e
--- /dev/null
+++ b/multimedia/k9copy-kde4/files/patch-libk9copy_k9dvd.cpp
@@ -0,0 +1,44 @@
+--- libk9copy/k9dvd.cpp.orig Fri Dec 9 19:18:03 2005
++++ libk9copy/k9dvd.cpp Thu Jan 5 06:12:30 2006
+@@ -27,7 +27,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <stdint.h>
++#ifdef HAVE_STDINT_H
++ #include <stdint.h>
++#elif defined(HAVE_INTTYPES_H)
++ #include <inttypes.h>
++#endif
+
+ #include "k9dvd.h"
+ #include "k9dvdtitle.h"
+@@ -196,7 +200,7 @@
+ return -1;
+ }
+
+- if ( fseek(filehandle, 32808, SEEK_SET )) {
++ if ( fseek(filehandle, 32768, SEEK_SET )) {
+ fclose(filehandle);
+ c.sprintf(tr2i18n("Couldn't seek in %s for title\n"), dvd_device);
+ setError(c);
+@@ -204,12 +208,18 @@
+ return -1;
+ }
+
+- if ( 32 != (i = fread(title, 1, 32, filehandle)) ) {
++ {
++ #define DVD_SEC_SIZ 2048
++ char tempBuf[ DVD_SEC_SIZ ];
++ if ( DVD_SEC_SIZ != fread(tempBuf, 1, DVD_SEC_SIZ, filehandle) ) {
+ fclose(filehandle);
+ // c=tr2i18n("Couldn't read enough bytes for title.\n");
+ // setError(c);
+ strcpy(title, "unknown");
+ return 0;
++ }
++ snprintf( title, 32, "%s", tempBuf + 40 );
++ i=32;
+ }
+
+ fclose (filehandle);