Module Name: src
Committed By: pooka
Date: Fri Nov 5 16:23:57 UTC 2010
Modified Files:
src/lib/libc/net: getifaddrs.c
src/sbin/ifconfig: Makefile
Log Message:
Need getifaddrs() for the rump client since it executes sysctl(2)
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/net/getifaddrs.c
cvs rdiff -u -r1.48 -r1.49 src/sbin/ifconfig/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/net/getifaddrs.c
diff -u src/lib/libc/net/getifaddrs.c:1.12 src/lib/libc/net/getifaddrs.c:1.13
--- src/lib/libc/net/getifaddrs.c:1.12 Mon Apr 27 20:10:49 2009
+++ src/lib/libc/net/getifaddrs.c Fri Nov 5 16:23:56 2010
@@ -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))
Index: src/sbin/ifconfig/Makefile
diff -u src/sbin/ifconfig/Makefile:1.48 src/sbin/ifconfig/Makefile:1.49
--- src/sbin/ifconfig/Makefile:1.48 Thu Nov 4 23:31:12 2010
+++ src/sbin/ifconfig/Makefile Fri Nov 5 16:23:56 2010
@@ -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>