diff options
Diffstat (limited to 'x11-misc/xvidcap/files/xvidcap-1.1.4-xtoxwd.c.patch')
-rw-r--r-- | x11-misc/xvidcap/files/xvidcap-1.1.4-xtoxwd.c.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/x11-misc/xvidcap/files/xvidcap-1.1.4-xtoxwd.c.patch b/x11-misc/xvidcap/files/xvidcap-1.1.4-xtoxwd.c.patch new file mode 100644 index 000000000000..9382d43165e8 --- /dev/null +++ b/x11-misc/xvidcap/files/xvidcap-1.1.4-xtoxwd.c.patch @@ -0,0 +1,63 @@ +diff -Nru xvidcap-1.1.4.vanilla/src/xtoxwd.c xvidcap-1.1.4/src/xtoxwd.c +--- xvidcap-1.1.4.vanilla/src/xtoxwd.c 2007-01-10 11:57:05.000000000 +0100 ++++ xvidcap-1.1.4/src/xtoxwd.c 2007-01-10 11:58:28.000000000 +0100 +@@ -51,9 +51,9 @@ + } + + /* +- * swap the byte order of a long integer (32 byte) ++ * swap the byte order of a integer (32 byte) + */ +-void swap_4byte(unsigned long *i) ++void swap_4byte(unsigned int *i) + { + unsigned char t; + unsigned char *p = (unsigned char *) i; +@@ -69,10 +69,10 @@ + /* + * swap the byte order of a 32 bit word; + */ +-void swap_n_4byte(unsigned char *p, unsigned long n) ++void swap_n_4byte(unsigned char *p, unsigned int n) + { + register unsigned char t; +- register unsigned long i; ++ register unsigned int i; + for (i = 0; i < n; i++) { + t = p[0]; + p[0] = p[3]; +@@ -87,7 +87,7 @@ + /* + * swap n bytes in a char array + */ +-void swap_n_bytes(unsigned char *p, unsigned long n) ++void swap_n_bytes(unsigned char *p, unsigned int n) + { + unsigned char t; + unsigned int i, h; +@@ -104,7 +104,7 @@ + /* + * global, we need this to check if we must swap some bytes + */ +-static unsigned long little_endian = 1; ++static unsigned int little_endian = 1; + + /* + * prepare the color table for the xwd file +@@ -175,13 +175,13 @@ + head.ncolors = (CARD32) job->ncolors; + head.window_width = (CARD32) win_attr.width; + head.window_height = (CARD32) win_attr.height; +- head.window_x = (long) win_attr.x; +- head.window_y = (long) win_attr.y; ++ head.window_x = (CARD32) win_attr.x; ++ head.window_y = (CARD32) win_attr.y; + head.window_bdrwidth = (CARD32) win_attr.border_width; + + if (*(char *) &little_endian) + swap_n_4byte((unsigned char *) &head, +- sizeof(head) / sizeof(long)); ++ sizeof(head) / sizeof(int)); + } + if (fwrite((char *) &head, sizeof(head), 1, fp) < 1) + perror(file); |