gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH 3/6] bcopy() gone in POSIX 2008.


From: Fred Wright
Subject: [gpsd-dev] [PATCH 3/6] bcopy() gone in POSIX 2008.
Date: Mon, 5 Sep 2016 18:09:25 -0700

This is the bcopy() portion of commit 4c8a74f, without the
_DEFAULT_SOURCE hack.

TESTED:
Ran "scons build-all" on OSX, Linux, FreeBSD, OpenBSD, and NetBSD.
---
 gps2udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gps2udp.c b/gps2udp.c
index 8345079..8066a8b 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -165,7 +165,7 @@ static int open_udp(char **hostport)
           return (-1);
        }
 
-       bcopy((char *)hp->h_addr, (char *)&remote[channel].sin_addr, 
hp->h_length);
+       memcpy( &remote[channel].sin_addr, hp->h_addr, hp->h_length);
        remote[channel].sin_port = htons((in_port_t)portnum);
    }
 return (0);
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]