From owner-p4-projects@FreeBSD.ORG Wed Aug 30 10:52:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89EB016A4EC; Wed, 30 Aug 2006 10:52:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AAC216A4E7 for ; Wed, 30 Aug 2006 10:52:33 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C1F543D5F for ; Wed, 30 Aug 2006 10:52:32 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7UAqVda057372 for ; Wed, 30 Aug 2006 10:52:32 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7UAqV3a057369 for perforce@freebsd.org; Wed, 30 Aug 2006 10:52:31 GMT (envelope-from piso@freebsd.org) Date: Wed, 30 Aug 2006 10:52:31 GMT Message-Id: <200608301052.k7UAqV3a057369@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 105321 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 10:52:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=105321 Change 105321 by piso@piso_newluxor on 2006/08/30 10:51:55 Ipfw's kernel side defines malloc as M_IPFW/M_IPFW_TBL, while libalias uses M_ALIAS: avoid them to clash moving libalias malloc redefinition to alias_mod.h. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#5 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#21 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_proxy.c#6 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#5 (text+ko) ==== @@ -63,14 +63,6 @@ #ifdef _KERNEL /* XXX: LibAliasSetTarget() uses this constant. */ #define INADDR_NONE 0xffffffff -MALLOC_DECLARE(M_ALIAS); - -/* Use kernel allocator. */ -#if defined(_SYS_MALLOC_H_) -#define malloc(x) malloc(x, M_ALIAS, M_NOWAIT|M_ZERO) -#define calloc(x, n) malloc(x*n) -#define free(x) free(x, M_ALIAS) -#endif #endif /* Sizes of input and output link tables */ ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#21 (text+ko) ==== @@ -32,6 +32,17 @@ #ifndef _ALIAS_MOD_H_ #define _ALIAS_MOD_H_ +#ifdef _KERNEL +MALLOC_DECLARE(M_ALIAS); + +/* Use kernel allocator. */ +#if defined(_SYS_MALLOC_H_) +#define malloc(x) malloc(x, M_ALIAS, M_NOWAIT|M_ZERO) +#define calloc(x, n) malloc(x*n) +#define free(x) free(x, M_ALIAS) +#endif +#endif + /* Protocol handlers struct & function. */ /* Packet flow direction. */ ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_proxy.c#6 (text+ko) ==== @@ -80,6 +80,7 @@ #ifdef _KERNEL #include #include +#include #else #include #include "alias.h" /* Public API functions for libalias */