From b5cccea088d6b9a2c24bafd9ba4d8289076a3084 Mon Sep 17 00:00:00 2001
From: Alex Beregszaszi <alex@rtfs.hu>
Date: Thu, 22 Feb 2007 13:34:36 +0000
Subject: [PATCH] change PF_INET to AF_INET to be consistent in the whole
 project. PF_INET is deprecated, while AF_INET is referred by the POSIX
 standards

Originally committed as revision 8073 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/barpainet.h | 1 -
 libavformat/tcp.c       | 2 +-
 libavformat/udp.c       | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/barpainet.h b/libavformat/barpainet.h
index b50bf82b6e7..c79855c2f7b 100644
--- a/libavformat/barpainet.h
+++ b/libavformat/barpainet.h
@@ -27,7 +27,6 @@
 
 # include <socket.h>
 int inet_aton (const char * str, struct in_addr * add);
-# define PF_INET AF_INET
 # define SO_SNDBUF 0x40000001
 
 /* fake */
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index fa9e13587ff..a5539be4c43 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -73,7 +73,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
     if (resolve_host(&dest_addr.sin_addr, hostname) < 0)
         goto fail;
 
-    fd = socket(PF_INET, SOCK_STREAM, 0);
+    fd = socket(AF_INET, SOCK_STREAM, 0);
     if (fd < 0)
         goto fail;
     fcntl(fd, F_SETFL, O_NONBLOCK);
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 46edd0f9022..bbf8ca2ec6e 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -330,7 +330,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
     }
 
 #ifndef CONFIG_IPV6
-    udp_fd = socket(PF_INET, SOCK_DGRAM, 0);
+    udp_fd = socket(AF_INET, SOCK_DGRAM, 0);
     if (udp_fd < 0)
         goto fail;
 
-- 
GitLab