comparison tcp.c @ 5595:0980c09b05c1 libavformat

Fix BSD compile (PF_UNSPEC is not a standard define, AF_UNSPEC is).
author rbultje
date Wed, 27 Jan 2010 22:31:13 +0000
parents 0dc71c7f6653
children b1a108ca71c5
comparison
equal deleted inserted replaced
5594:be39b68919ab 5595:0980c09b05c1
51 &port, path, sizeof(path), uri); 51 &port, path, sizeof(path), uri);
52 if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) 52 if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
53 return AVERROR(EINVAL); 53 return AVERROR(EINVAL);
54 54
55 memset(&hints, 0, sizeof(hints)); 55 memset(&hints, 0, sizeof(hints));
56 hints.ai_family = PF_UNSPEC; 56 hints.ai_family = AF_UNSPEC;
57 hints.ai_socktype = SOCK_STREAM; 57 hints.ai_socktype = SOCK_STREAM;
58 snprintf(portstr, sizeof(portstr), "%d", port); 58 snprintf(portstr, sizeof(portstr), "%d", port);
59 if (getaddrinfo(hostname, portstr, &hints, &ai)) 59 if (getaddrinfo(hostname, portstr, &hints, &ai))
60 return AVERROR(EIO); 60 return AVERROR(EIO);
61 61