diff options
author | François Revol <revol@free.fr> | 2007-01-18 17:22:30 +0000 |
---|---|---|
committer | François Revol <revol@free.fr> | 2007-01-18 17:22:30 +0000 |
commit | e9d511dc7eb09aeac21efa74fb699b9be3d37fde (patch) | |
tree | e80d4bde577baa7eab3e60145d286112fb3aa4a6 /libavformat/udp.c | |
parent | 453cd7a49676e42f804d824d216da2778673d28e (diff) | |
download | ffmpeg-e9d511dc7eb09aeac21efa74fb699b9be3d37fde.tar.gz |
The long awaited BeOS cleanup, phase 1
Originally committed as revision 7581 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 96fa4e152c..3a309c610a 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -23,11 +23,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> -#ifndef __BEOS__ # include <arpa/inet.h> -#else -# include "barpainet.h" -#endif #include <netdb.h> #ifndef IPV6_ADD_MEMBERSHIP @@ -214,11 +210,7 @@ static int udp_ipv6_set_local(URLContext *h) { fail: if (udp_fd >= 0) -#ifdef CONFIG_BEOS_NETSERVER closesocket(udp_fd); -#else - close(udp_fd); -#endif if(res0) freeaddrinfo(res0); return -1; @@ -421,11 +413,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) return 0; fail: if (udp_fd >= 0) -#ifdef CONFIG_BEOS_NETSERVER closesocket(udp_fd); -#else - close(udp_fd); -#endif av_free(s); return AVERROR_IO; } @@ -482,22 +470,20 @@ static int udp_close(URLContext *h) { UDPContext *s = h->priv_data; -#ifndef CONFIG_BEOS_NETSERVER #ifndef CONFIG_IPV6 +#ifdef IP_DROP_MEMBERSHIP if (s->is_multicast && !(h->flags & URL_WRONLY)) { if (setsockopt(s->udp_fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &s->mreq, sizeof(s->mreq)) < 0) { perror("IP_DROP_MEMBERSHIP"); } } +#endif #else if (s->is_multicast && !(h->flags & URL_WRONLY)) udp_ipv6_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr); #endif - close(s->udp_fd); -#else closesocket(s->udp_fd); -#endif av_free(s); return 0; } |