Using AF_* constants instead of PF_* (for POSIX compliance)
This commit is contained in:
parent
2fd22109e4
commit
0246b35efb
|
@ -45,7 +45,7 @@
|
|||
|
||||
/* for tcp4 and tcp6 */
|
||||
#ifndef TCP_FAMILY
|
||||
# define TCP_FAMILY PF_UNSPEC
|
||||
# define TCP_FAMILY AF_UNSPEC
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -255,7 +255,7 @@ static int _init_client(TCP * tcp, char const * name)
|
|||
if(_tcp_socket_init(&tcp->u.client, aip->ai_family, tcp) != 0)
|
||||
continue;
|
||||
#ifdef DEBUG
|
||||
if(aip->ai_family == PF_INET)
|
||||
if(aip->ai_family == AF_INET)
|
||||
{
|
||||
sa = (struct sockaddr_in *)aip->ai_addr;
|
||||
fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__,
|
||||
|
@ -316,7 +316,7 @@ static int _init_server(TCP * tcp, char const * name)
|
|||
tcp->u.server.fd = tcpsocket.fd;
|
||||
/* accept incoming connections */
|
||||
#ifdef DEBUG
|
||||
if(aip->ai_family == PF_INET)
|
||||
if(aip->ai_family == AF_INET)
|
||||
{
|
||||
sa = (struct sockaddr_in *)aip->ai_addr;
|
||||
fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS System libApp */
|
||||
/* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,5 +15,5 @@
|
|||
|
||||
|
||||
|
||||
#define TCP_FAMILY PF_INET
|
||||
#define TCP_FAMILY AF_INET
|
||||
#include "tcp.c"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS System libApp */
|
||||
/* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,5 +15,5 @@
|
|||
|
||||
|
||||
|
||||
#define TCP_FAMILY PF_INET6
|
||||
#define TCP_FAMILY AF_INET6
|
||||
#include "tcp.c"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS System libApp */
|
||||
/* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -276,7 +276,7 @@ static int _udp_send(UDP * udp, AppMessage * message, int acknowledge)
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
if(udp->aip->ai_family == PF_INET)
|
||||
if(udp->aip->ai_family == AF_INET)
|
||||
{
|
||||
sa = (struct sockaddr_in *)udp->aip->ai_addr;
|
||||
fprintf(stderr, "DEBUG: %s() %s (%s:%u)\n", __func__,
|
||||
|
|
Loading…
Reference in New Issue
Block a user