Source-Changes-HG archive

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

[src/trunk]: src/lib/libipsec s/CFLAGS/CPPFLAGS/ for -D and -I.



details:   https://anonhg.NetBSD.org/src/rev/449610909394
branches:  trunk
changeset: 474304:449610909394
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sat Jul 03 06:59:28 1999 +0000

description:
s/CFLAGS/CPPFLAGS/ for -D and -I.
remove lint error.

diffstat:

 lib/libipsec/Makefile |   9 +++++----
 lib/libipsec/pfkey.c  |  15 +++++++++++++--
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r f47734602310 -r 449610909394 lib/libipsec/Makefile
--- a/lib/libipsec/Makefile     Sat Jul 03 06:26:25 1999 +0000
+++ b/lib/libipsec/Makefile     Sat Jul 03 06:59:28 1999 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1 1999/07/01 20:15:27 itojun Exp $
+# $NetBSD: Makefile,v 1.2 1999/07/03 06:59:28 itojun Exp $
 
 LIB=   ipsec
-CFLAGS+=-g -DIPSEC_DEBUG
-CFLAGS+=-DIPSEC
-CFLAGS+=-DINET6
+#CFLAGS+=-g
+CPPFLAGS+=-DIPSEC_DEBUG
+CPPFLAGS+=-DIPSEC
+CPPFLAGS+=-DINET6
 
 .PATH: ${.CURDIR}/../../sys/netkey
 SRCS=  pfkey.c pfkey_dump.c
diff -r f47734602310 -r 449610909394 lib/libipsec/pfkey.c
--- a/lib/libipsec/pfkey.c      Sat Jul 03 06:26:25 1999 +0000
+++ b/lib/libipsec/pfkey.c      Sat Jul 03 06:59:28 1999 +0000
@@ -28,7 +28,9 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("@(#) pfkey.c $Revision: 1.2 $");
+#ifndef lint
+__RCSID("@(#) pfkey.c $Revision: 1.3 $");
+#endif
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1146,7 +1148,16 @@
 
        ((struct sockaddr *)p)->sa_len = _SALENBYAF(family);
        ((struct sockaddr *)p)->sa_family = family;
-       _INPORTBYSA(p) = port;
+       switch (family) {
+       case AF_INET:
+               ((struct sockaddr_in *)p)->sin_port = port;
+               break;
+#ifdef INET6
+       case AF_INET6:
+               ((struct sockaddr_in6 *)p)->sin6_port = port;
+               break;
+#endif
+       }
        memcpy(_INADDRBYSA(p), addr, _INALENBYAF(family));
 
        return buf + len;



Home | Main Index | Thread Index | Old Index