summaryrefslogtreecommitdiff
path: root/multimedia/libmp4v2/patches/patch-ae
blob: 85fec75be96f07c394a0101ec1ecf45ca0389b1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$NetBSD: patch-ae,v 1.3 2017/04/17 08:40:56 wiz Exp $

let <string.h> declare strcasestr() correctly
Fix fpos_t cast on NetBSD (_pos vs. __pos)

--- include/mpeg4ip.h.orig	2006-08-07 18:27:00.000000000 +0000
+++ include/mpeg4ip.h
@@ -120,14 +120,6 @@
 #endif
 #include <sys/param.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-char *strcasestr(const char *haystack, const char *needle);
-#ifdef __cplusplus
-}
-#endif
-
 #define OPEN_RDWR O_RDWR
 #define OPEN_CREAT O_CREAT 
 #define OPEN_RDONLY O_RDONLY
@@ -156,6 +148,9 @@ char *strcasestr(const char *haystack, c
 #ifdef HAVE_FPOS_T___POS
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos).__pos)
 #define VAR_TO_FPOS(fpos, var) (fpos).__pos = (var)
+#elif defined(__NetBSD__)
+#define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos)._pos)
+#define VAR_TO_FPOS(fpos, var) (fpos)._pos = (var)
 #else
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(fpos)
 #define VAR_TO_FPOS(fpos, var) (fpos) = (var)
@@ -233,7 +228,8 @@ char *strsep(char **strp, const char *de
 
 #define ADV_SPACE(a) {while (isspace(*(a)) && (*(a) != '\0'))(a)++;}
 
-#ifndef HAVE_GTK
+#ifndef __G_LIB_H__
+/* #ifndef HAVE_GTK */
 typedef char gchar;
 typedef unsigned char guchar;