diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-01-29 00:06:18 +1100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2016-02-02 08:42:09 +0100 |
commit | 9f94620a308a3b17c1886c2c4807b34b8d5edacb (patch) | |
tree | 8af2832c8b9dec811b3e6bae296ce63fb00410e3 /ctdb/utils | |
parent | 9f8395cb7d49b63a82f75bf504f5f83920102b29 (diff) | |
download | samba-9f94620a308a3b17c1886c2c4807b34b8d5edacb.tar.gz |
ctdb-common: Use documented names for protocol family in socket()
Instead of using PF_*, use AF_*.
https://bugzilla.samba.org/show_bug.cgi?id=11705
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'ctdb/utils')
-rw-r--r-- | ctdb/utils/smnotify/smnotify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/utils/smnotify/smnotify.c b/ctdb/utils/smnotify/smnotify.c index fa584ff7ea1..0cd61c7b2da 100644 --- a/ctdb/utils/smnotify/smnotify.c +++ b/ctdb/utils/smnotify/smnotify.c @@ -43,14 +43,14 @@ static int create_socket(const char *addr, int port) int s; struct sockaddr_in sock_in; - s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (s == -1) { printf("Failed to open local socket\n"); exit(10); } bzero(&sock_in, sizeof(sock_in)); - sock_in.sin_family = PF_INET; + sock_in.sin_family = AF_INET; sock_in.sin_port = htons(port); inet_aton(addr, &sock_in.sin_addr); if (bind(s, (struct sockaddr *)&sock_in, sizeof(sock_in)) == -1) { @@ -124,7 +124,7 @@ int main(int argc, const char *argv[]) /* Setup a sockaddr_in for the client we want to notify */ bzero(&sock_cl, sizeof(sock_cl)); - sock_cl.sin_family = PF_INET; + sock_cl.sin_family = AF_INET; sock_cl.sin_port = htons(clientport); inet_aton(client, &sock_cl.sin_addr); |