PERFORCE change 42870 for review

Robert Watson rwatson at FreeBSD.org
Fri Nov 21 03:21:21 GMT 2003


http://perforce.freebsd.org/chv.cgi?CH=42870

Change 42870 by rwatson at rwatson_powerbook on 2003/11/20 19:20:39

	Necessary include tweaks to allow checkpolicy to compile
	queue.c into userspace.  There appear to be a couple of
	divergences from the malloc/free compatibility mess in sebsd,
	so I've attempted to work around that.  Since this code
	presumably compiles for someone, there's probably some
	outstanding patches out there that need to be submitted in
	place of these.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/global.h#5 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/global.h#5 (text+ko) ====

@@ -29,10 +29,9 @@
 #else /* _KERNEL */
 #include <stdlib.h>
 #include <errno.h>
-/*
 #define sebsd_malloc(a,b,c) (c&M_ZERO)?calloc(1,a):malloc(a)
 #define sebsd_free(a,b) free(a)
-*/
+#define kmalloc(l, f) malloc(l)
 #define	mtx_lock(a)
 #define	mtx_unlock(a)
 #endif /* _KERNEL */

==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.c#5 (text+ko) ====

@@ -11,7 +11,10 @@
 #include <sys/param.h>
 #include <sys/conf.h>
 #include <sys/kernel.h>
-#endif /* FreeBSD _KERNEL */
+#else /* FreeBSD _KERNEL */
+#define malloc(a,b,c) (c&M_ZERO)?calloc(1,a):malloc(a)
+#define free(a,b) free(a)
+#endif
 
 #include <security/sebsd/linux-compat.h>
 #include <security/sebsd/ss/global.h>
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list