summaryrefslogtreecommitdiff
path: root/multimedia/xine-lib/patches/patch-src-xine-engine-post.h
blob: d34bd19eb4de1b919c1d89bdc496642dc967118c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-src-xine-engine-post.h,v 1.1 2011/09/04 14:34:52 joerg Exp $

--- src/xine-engine/post.h.orig	2010-03-09 22:17:05.000000000 +0000
+++ src/xine-engine/post.h
@@ -370,14 +370,15 @@ do {                                    
 
 
 /* macros to create parameter descriptors */
+#include <stddef.h>
 
 #define START_PARAM_DESCR( param_t ) \
 static param_t temp_s; \
 static xine_post_api_parameter_t temp_p[] = {
 
-#define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \
-{ param_type, #var, sizeof(temp_s.var), \
-  (char*)&temp_s.var-(char*)&temp_s, enumv, min, max, readonly, descr },
+#define PARAM_ITEM( param_t, param_type, var, enumv, min, max, readonly, descr ) \
+{ param_type, #var, sizeof(temp_s.var), offsetof(param_t, var), \
+  enumv, min, max, readonly, descr },
 
 #define END_PARAM_DESCR( name ) \
   { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \