Source-Changes-HG archive

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

[src/trunk]: src Need getifaddrs() for the rump client since it executes sysc...



details:   https://anonhg.NetBSD.org/src/rev/859124744e7d
branches:  trunk
changeset: 758478:859124744e7d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Nov 05 16:23:56 2010 +0000

description:
Need getifaddrs() for the rump client since it executes sysctl(2)

diffstat:

 lib/libc/net/getifaddrs.c |  13 ++++++++++---
 sbin/ifconfig/Makefile    |   4 +++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diffs (63 lines):

diff -r 17384512bfd8 -r 859124744e7d lib/libc/net/getifaddrs.c
--- a/lib/libc/net/getifaddrs.c Fri Nov 05 15:55:23 2010 +0000
+++ b/lib/libc/net/getifaddrs.c Fri Nov 05 16:23:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getifaddrs.c,v 1.12 2009/04/27 20:10:49 dyoung Exp $   */
+/*     $NetBSD: getifaddrs.c,v 1.13 2010/11/05 16:23:56 pooka Exp $    */
 
 /*
  * Copyright (c) 1995, 1999
@@ -27,10 +27,12 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getifaddrs.c,v 1.12 2009/04/27 20:10:49 dyoung Exp $");
+__RCSID("$NetBSD: getifaddrs.c,v 1.13 2010/11/05 16:23:56 pooka Exp $");
 #endif /* LIBC_SCCS and not lint */
 
+#ifndef RUMP_ACTION
 #include "namespace.h"
+#endif
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -46,11 +48,16 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef __weak_alias
+#if defined(__weak_alias) && !defined(RUMP_ACTION)
 __weak_alias(getifaddrs,_getifaddrs)
 __weak_alias(freeifaddrs,_freeifaddrs)
 #endif
 
+#ifdef RUMP_ACTION
+#include <rump/rump_syscalls.h>
+#define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f)
+#endif
+
 #define        SALIGN  (sizeof(long) - 1)
 #define        SA_RLEN(sa)     ((sa)->sa_len ? (((sa)->sa_len + SALIGN) & ~SALIGN) : (SALIGN + 1))
 
diff -r 17384512bfd8 -r 859124744e7d sbin/ifconfig/Makefile
--- a/sbin/ifconfig/Makefile    Fri Nov 05 15:55:23 2010 +0000
+++ b/sbin/ifconfig/Makefile    Fri Nov 05 16:23:56 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.48 2010/11/04 23:31:12 pooka Exp $
+#      $NetBSD: Makefile,v 1.49 2010/11/05 16:23:56 pooka Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/5/93
 
 # when making a change to this file, please check if the change is
@@ -31,10 +31,12 @@
 # make rump system calls to a server in another process.
 #
 .ifdef RUMP_ACTION
+.PATH:         ${.CURDIR}/../../lib/libc/net
 CPPFLAGS+=     -DRUMP_SYS_NETWORKING -DRUMP_SYS_IOCTL -DRUMP_SYS_CLOSE
 CPPFLAGS+=     -DRUMP_ACTION
 LDADD+=                -lrumpclient
 DBG=           -g
+SRCS+=         getifaddrs.c
 .endif
 
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index