Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2014 22:04:08 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273189 - in head: lib/libc/string sys/libkern
Message-ID:  <201410162204.s9GM48sa009652@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Oct 16 22:04:07 2014
New Revision: 273189
URL: https://svnweb.freebsd.org/changeset/base/273189

Log:
  Remove duplicated code.
  
  Suggested by:	jmg

Deleted:
  head/lib/libc/string/explicit_bzero.c
Modified:
  head/lib/libc/string/Makefile.inc
  head/sys/libkern/explicit_bzero.c

Modified: head/lib/libc/string/Makefile.inc
==============================================================================
--- head/lib/libc/string/Makefile.inc	Thu Oct 16 22:00:24 2014	(r273188)
+++ head/lib/libc/string/Makefile.inc	Thu Oct 16 22:04:07 2014	(r273189)
@@ -2,6 +2,7 @@
 # $FreeBSD$
 
 .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string
+.PATH: ${LIBC_SRCTOP}/../../sys/libkern
 
 CFLAGS+= -I${LIBC_SRCTOP}/locale
 

Modified: head/sys/libkern/explicit_bzero.c
==============================================================================
--- head/sys/libkern/explicit_bzero.c	Thu Oct 16 22:00:24 2014	(r273188)
+++ head/sys/libkern/explicit_bzero.c	Thu Oct 16 22:04:07 2014	(r273189)
@@ -7,7 +7,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#ifdef _KERNEL
 #include <sys/libkern.h>
+#else
+#include <string.h>
+#endif /* _KERNEL */
 
 __attribute__((weak)) void __explicit_bzero_hook(void *, size_t);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410162204.s9GM48sa009652>