summaryrefslogtreecommitdiff
path: root/recipes/mplayer/files/fix-addrinfo.patch
blob: af254e4c94336e119d04397eeab9ffc6dcdc991d (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
From d15b488e1d0945766da37c9c0f3e286833ecea20 Mon Sep 17 00:00:00 2001
From: cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>
Date: Thu, 14 Jan 2010 12:06:38 +0000
Subject: Fix compilation after recent changes in FFmpeg.

Patch by Etienne Buira, etienne D buira A free D fr


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30302 b3059339-0415-0410-9bf9-f77b7e298cf2
---
diff --git a/configure b/configure
index 3dab6ba..ed5d89c 100755
--- a/configure
+++ b/configure
@@ -680,6 +680,9 @@ _tv_dshow=auto
 _pvr=auto
 _network=yes
 _winsock2_h=auto
+_struct_addrinfo=auto
+_getaddrinfo=auto
+_struct_sockaddr_storage=auto
 _smb=auto
 _vidix=auto
 _vidix_pcidb=yes
@@ -3100,6 +3103,64 @@ else
 fi
 
 
+echocheck "netdb.h, struct addrinfo"
+if test "$_struct_addrinfo" = auto; then
+  _struct_addrinfo=no
+  cat > $TMPC << EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+int main(void) { struct addrinfo ai; return 0; }
+EOF
+  cc_check && _struct_addrinfo=yes
+fi
+echores "$_struct_addrinfo"
+
+if test "$_struct_addrinfo" = yes; then
+  def_addrinfo="#define HAVE_STRUCT_ADDRINFO 1"
+else
+  def_addrinfo="#define HAVE_STRUCT_ADDRINFO 0"
+fi
+
+
+echocheck "netdb.h, getaddrinfo()"
+if test "$_getaddrinfo" = auto; then
+  _getaddrinfo=no
+  cat > $TMPC << EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+int main(void) { (void) getaddrinfo(0, 0, 0, 0); return 0; }
+EOF
+  cc_check && _getaddrinfo=yes
+fi
+echores "$_getaddrinfo"
+
+if test "$_getaddrinfo" = yes; then
+  def_getaddrinfo="#define HAVE_GETADDRINFO 1"
+else
+  def_getaddrinfo="define HAVE_GETADDRINFO 0"
+fi
+
+
+echocheck "sockaddr_storage"
+if test "$_struct_sockaddr_storage" = auto; then
+  _struct_sockaddr_storage=no
+  cat > $TMPC << EOF
+#include <sys/socket.h>
+int main(void) { struct sockaddr_storage sas; return 0; }
+EOF
+  cc_check && _struct_sockaddr_storage=yes
+fi
+echores "$_struct_sockaddr_storage"
+
+if test "$_struct_sockaddr_storage" = yes; then
+  def_sockaddr_storage="#define HAVE_STRUCT_SOCKADDR_STORAGE 1"
+else
+  def_sockaddr_storage="#define HAVE_STRUCT_SOCKADDR_STORAGE 0"
+fi
+
+
 echocheck "arpa/inet.h"
 arpa_inet_h=no
 def_arpa_inet_h='#define HAVE_ARPA_INET_H 0'
@@ -8907,6 +8968,9 @@ $def_network
 $def_smb
 $def_socklen_t
 $def_vstream
+$def_addrinfo
+$def_getaddrinfo
+$def_sockaddr_storage
 
 
 /* libvo options */
--
cgit v0.8.2.1-10-g45e7