$OpenBSD: patch-liba52_bitstream_c,v 1.4 2012/05/25 07:15:41 ajacoutot Exp $
--- liba52/bitstream.c.orig	Sat May 31 20:28:55 2003
+++ liba52/bitstream.c	Tue May 15 02:19:52 2012
@@ -23,6 +23,7 @@
 
 #include "config.h"
 
+#include <stddef.h>
 #include <inttypes.h>
 
 #include "a52.h"
@@ -33,9 +34,9 @@
 
 void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf)
 {
-    int align;
+    ptrdiff_t align;
 
-    align = (long)buf & 3;
+    align = (ptrdiff_t)buf & 3;
     state->buffer_start = (uint32_t *) (buf - align);
     state->bits_left = 0;
     state->current_word = 0;
