mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
Add portable way to check for the existence of definitions and
apply it to socklen_t. patch by Dave Yeo, daveryeo telus net Originally committed as revision 11366 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c86ec2f4c3
commit
72be9e73ae
21
configure
vendored
21
configure
vendored
@ -551,6 +551,23 @@ int main(void){
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_type(){
|
||||||
|
log check_type "$@"
|
||||||
|
headers=$1
|
||||||
|
type=$2
|
||||||
|
shift 2
|
||||||
|
disable $type
|
||||||
|
incs=""
|
||||||
|
for hdr in $headers; do
|
||||||
|
incs="$incs
|
||||||
|
#include <$hdr>"
|
||||||
|
done
|
||||||
|
check_cc "$@" <<EOF && enable $type
|
||||||
|
$incs
|
||||||
|
$type v;
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
require(){
|
require(){
|
||||||
name="$1"
|
name="$1"
|
||||||
header="$2"
|
header="$2"
|
||||||
@ -720,6 +737,7 @@ HAVE_LIST="
|
|||||||
roundf
|
roundf
|
||||||
sdl
|
sdl
|
||||||
sdl_video_size
|
sdl_video_size
|
||||||
|
socklen_t
|
||||||
soundcard_h
|
soundcard_h
|
||||||
sys_poll_h
|
sys_poll_h
|
||||||
sys_select_h
|
sys_select_h
|
||||||
@ -1684,6 +1702,8 @@ fi
|
|||||||
|
|
||||||
texi2html -version >/dev/null 2>&1 && enable texi2html || disable texi2html
|
texi2html -version >/dev/null 2>&1 && enable texi2html || disable texi2html
|
||||||
|
|
||||||
|
check_type sys/socket.h socklen_t
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# Network check
|
# Network check
|
||||||
|
|
||||||
@ -1693,6 +1713,7 @@ if enabled network; then
|
|||||||
check_func closesocket
|
check_func closesocket
|
||||||
elif check_header winsock2.h ; then
|
elif check_header winsock2.h ; then
|
||||||
network_extralibs="-lws2_32"
|
network_extralibs="-lws2_32"
|
||||||
|
check_type ws2tcpip.h socklen_t
|
||||||
check_func2 winsock2.h closesocket
|
check_func2 winsock2.h closesocket
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* miscellaneous OS support macros and functions.
|
* miscellaneous OS support macros and functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__BEOS__) || defined(__INNOTEK_LIBC__) || defined(__DJGPP__)
|
#ifndef HAVE_SOCKLEN_T
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user