svn commit: r273189 - in head: lib/libc/string sys/libkern

Xin LI delphij at FreeBSD.org
Thu Oct 16 22:04:08 UTC 2014


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);
 


More information about the svn-src-head mailing list