--- old/usr/src/cmd/avs/sdbc/scmadm.c	Sun Dec 14 23:31:12 2014
+++ new/usr/src/cmd/avs/sdbc/scmadm.c	Sun Dec 14 23:31:12 2014
@@ -125,7 +125,7 @@
 void
 sdbc_report_error(spcs_s_info_t *ustatus)
 {
-	if (*ustatus != NULL) {
+	if (*ustatus != (uintptr_t)NULL) {
 		spcs_s_report(*ustatus, stderr);
 		spcs_s_ufree(ustatus);
 	} else
--- old/usr/src/cmd/bart/compare.c	Sun Dec 14 23:31:13 2014
+++ new/usr/src/cmd/bart/compare.c	Sun Dec 14 23:31:13 2014
@@ -246,7 +246,7 @@
 
 	/* Reset these fields... */
 
-	*contents = NULL;
+	*contents = '\0';
 	*devnode = '\0';
 	*dest = '\0';
 
--- old/usr/src/cmd/bnu/getprm.c	Sun Dec 14 23:31:13 2014
+++ new/usr/src/cmd/bnu/getprm.c	Sun Dec 14 23:31:13 2014
@@ -235,7 +235,7 @@
 	    if (cl != (cr = wcsrchr(n, (wchar_t)'!'))) {
 		/*  more than one ! */
 		wcsncpy(tmpbuf, cl+1, cr-cl-1);
-		tmpbuf[cr-cl-1] = NULL;
+		tmpbuf[cr-cl-1] = L'\0';
 		(void) wcstombs(fwd, tmpbuf, MAXFULLNAME);
 	    }
 	} else {
--- old/usr/src/cmd/bnu/gio.c	Sun Dec 14 23:31:13 2014
+++ new/usr/src/cmd/bnu/gio.c	Sun Dec 14 23:31:13 2014
@@ -72,7 +72,7 @@
 	if (Debug > 4)
 		pkdebug = 1;
 	Pk = pkopen(Ifn, Ofn);
-	if ((int) Pk == NULL)
+	if ( Pk == NULL)
 		return(FAIL);
 	return(0);
 }
--- old/usr/src/cmd/bnu/interface.c	Sun Dec 14 23:31:14 2014
+++ new/usr/src/cmd/bnu/interface.c	Sun Dec 14 23:31:14 2014
@@ -302,19 +302,19 @@
 	}
 
 	if (info.tsdu <= 0 || nbytes <= info.tsdu)
-		return (t_snd(fd, buf, nbytes, NULL));
+		return (t_snd(fd, buf, nbytes, 0));
 
 	/* if get here, then there is a limit on transmit size	*/
 	/* (info.tsdu > 0) and buf exceeds it			*/
 	i = ret = 0;
 	while (nbytes >= info.tsdu) {
-		if ((ret = t_snd(fd,  &buf[i], info.tsdu, NULL)) != info.tsdu)
+		if ((ret = t_snd(fd,  &buf[i], info.tsdu, 0)) != info.tsdu)
 			return ((ret >= 0 ? (i + ret) : ret));
 		i += info.tsdu;
 		nbytes -= info.tsdu;
 	}
 	if (nbytes != 0) {
-		if ((ret = t_snd(fd,  &buf[i], nbytes, NULL)) != nbytes)
+		if ((ret = t_snd(fd,  &buf[i], nbytes, 0)) != nbytes)
 			return ((ssize_t)(ret >= 0 ? (i + ret) : ret));
 		i += nbytes;
 	}
--- old/usr/src/cmd/bnu/sysfiles.c	Sun Dec 14 23:31:14 2014
+++ new/usr/src/cmd/bnu/sysfiles.c	Sun Dec 14 23:31:14 2014
@@ -480,7 +480,7 @@
 
 	ASSERT(len >= BUFSIZ, "BUFFER TOO SMALL", "getsysline", 0);
 	for(;;) {
-		while (getaline(fsystems, buf) != NULL)
+		while (getaline(fsystems, buf) != 0)
 		    if ((*buf != '#') && (*buf != ' ') &&
 			(*buf != '\t') && (*buf != '\n')) {
 			(void) _uu_resetlocale(LC_ALL, prev);
--- old/usr/src/cmd/bnu/uudecode.c	Sun Dec 14 23:31:14 2014
+++ new/usr/src/cmd/bnu/uudecode.c	Sun Dec 14 23:31:14 2014
@@ -356,7 +356,7 @@
 		while ((fgets(inbuf, sizeof (inbuf), in)) != NULL) {
 			/* process an input line */
 			iptr = inbuf;
-			while ((curchr = *(iptr++)) != NULL) {
+			while ((curchr = *(iptr++)) != '\0') {
 				/* decode chars */
 				if (curchr == '=') /* if end */
 					endseen++;
--- old/usr/src/cmd/chmod/chmod.c	Sun Dec 14 23:31:15 2014
+++ new/usr/src/cmd/chmod/chmod.c	Sun Dec 14 23:31:15 2014
@@ -553,7 +553,7 @@
 	/* process the arguments */
 
 	for (i = mac = 0;
-	    (av[i] != (char *)NULL) && (av[i][0] != (char)NULL);
+	    (av[i] != NULL) && (av[i][0] != '\0');
 	    i++) {
 		if (!fflag && av[i][0] == '-') {
 			/*
--- old/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c	Sun Dec 14 23:31:15 2014
+++ new/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c	Sun Dec 14 23:31:15 2014
@@ -661,11 +661,11 @@
 	    sizeof (well_known), well_known))
 		return (ERR_FAIL);
 
-	ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL);
+	ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, (TSS_HKEY)NULL);
 	if (ret == TPM_E_NO_ENDORSEMENT) {
 		if (createek(hContext, hTPM))
 			return (ERR_FAIL);
-		ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL);
+		ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, (TSS_HKEY)NULL);
 	}
 	if (ret) {
 		print_error(ret, gettext("Take ownership"));
@@ -701,7 +701,7 @@
 	    gettext("= New TPM owner passphrase ="), 0, NULL))
 		return (ERR_FAIL);
 
-	ret = Tspi_ChangeAuth(hTPM, NULL, hNewPolicy);
+	ret = Tspi_ChangeAuth(hTPM, (TSS_HOBJECT)NULL, hNewPolicy);
 	if (ret && ret != TSP_ERROR(TSS_E_POLICY_NO_SECRET)) {
 		print_error(ret, gettext("Change authorization"));
 		return (ERR_FAIL);
--- old/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/ikeadm.c	Sun Dec 14 23:31:15 2014
+++ new/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/ikeadm.c	Sun Dec 14 23:31:15 2014
@@ -732,7 +732,7 @@
 	{SADB_X_IDENTTYPE_ADDR_RANGE,	"rangev4"},
 	{SADB_X_IDENTTYPE_ADDR_RANGE,	"rangev6"},
 	{SADB_X_IDENTTYPE_KEY_ID,	"keyid"},
-	{NULL,	0}
+	{0, NULL}
 };
 
 static int
@@ -900,7 +900,7 @@
 	{PSFLD_REMIDTYPE,	"remoteidtype"},
 	{PSFLD_MODE,		"ike_mode"},
 	{PSFLD_KEY,		"key"},
-	{NULL,	0}
+	{0, NULL}
 };
 
 static int
@@ -926,7 +926,7 @@
 	{IKE_XCHG_IDENTITY_PROTECT,	"main"},
 	{IKE_XCHG_AGGRESSIVE,		"aggressive"},
 	{IKE_XCHG_IP_AND_AGGR,		"both"},
-	{NULL,	0}
+	{0, NULL}
 };
 
 static int
@@ -3345,7 +3345,7 @@
 	case IKE_SVC_DUMP_AUTHALGS:
 	case IKE_SVC_DUMP_PS:
 	case IKE_SVC_DUMP_CERTCACHE:
-		if (argc != NULL) {
+		if (argc != 0) {
 			print_dump_help();
 			break;
 		}
--- old/usr/src/cmd/fm/modules/common/fabric-xlate/fx_fabric.c	Sun Dec 14 23:31:16 2014
+++ new/usr/src/cmd/fm/modules/common/fabric-xlate/fx_fabric.c	Sun Dec 14 23:31:16 2014
@@ -50,7 +50,7 @@
 	PCI_MA,			PCI_STAT_R_MAST_AB,	NULL,
 	PCI_REC_TA,		PCI_STAT_R_TARG_AB,	NULL,
 	PCI_SIG_TA,		PCI_STAT_S_TARG_AB,	NULL,
-	NULL, NULL, NULL
+	NULL, 0 , NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pci.sec-* */
@@ -63,7 +63,7 @@
 #endif
 	PCI_REC_TA,		PCI_STAT_R_TARG_AB,	NULL,
 	PCI_SIG_TA,		PCI_STAT_S_TARG_AB,	NULL,
-	NULL, NULL, NULL, NULL,
+	NULL, 0 , NULL
 };
 
 
@@ -70,7 +70,7 @@
 /* Translate Fabric ereports to ereport.io.pci.dto */
 static fab_erpt_tbl_t fab_pci_bdg_ctl_erpt_tbl[] = {
 	PCI_DTO,	PCI_BCNF_BCNTRL_DTO_STAT,	NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pciex.* */
@@ -81,7 +81,7 @@
 	PCIEX_BDP,	PCIE_AER_CE_BAD_DLLP,		NULL,
 	PCIEX_BTP,	PCIE_AER_CE_BAD_TLP,		NULL,
 	PCIEX_ANFE,	PCIE_AER_CE_AD_NFE,		NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /*
@@ -104,7 +104,7 @@
 	PCIEX_UR,	PCIE_AER_UCE_UR,		PCI_TARG_MA,
 #endif
 	PCIEX_POIS,	PCIE_AER_UCE_PTLP,		PCI_TARG_MDPE,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pciex.* */
@@ -124,7 +124,7 @@
 	PCIEX_S_PERR,	PCIE_AER_SUCE_PERR_ASSERT,	PCI_TARG_MDPE,
 	PCIEX_S_SERR,	PCIE_AER_SUCE_SERR_ASSERT,	NULL,
 	PCIEX_INTERR,	PCIE_AER_SUCE_INTERNAL_ERR,	NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pcix.* */
@@ -132,7 +132,7 @@
 	PCIX_SPL_DIS,		PCI_PCIX_SPL_DSCD,	NULL,
 	PCIX_UNEX_SPL,		PCI_PCIX_UNEX_SPL,	NULL,
 	PCIX_RX_SPL_MSG,	PCI_PCIX_RX_SPL_MSG,	NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 static fab_erpt_tbl_t *fab_pcix_bdg_erpt_tbl = fab_pcix_erpt_tbl;
 
@@ -142,7 +142,7 @@
 	PCIX_UNEX_SPL,		PCI_PCIX_BSS_UNEX_SPL,	NULL,
 	PCIX_BSS_SPL_OR,	PCI_PCIX_BSS_SPL_OR,	NULL,
 	PCIX_BSS_SPL_DLY,	PCI_PCIX_BSS_SPL_DLY,	NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pciex.* */
@@ -153,7 +153,7 @@
 	PCIEX_FAT,		PCIE_DEVSTS_FE_DETECTED,	NULL,
 	PCIEX_NONFAT,		PCIE_DEVSTS_NFE_DETECTED,	NULL,
 	PCIEX_CORR,		PCIE_DEVSTS_CE_DETECTED,	NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /* Translate Fabric ereports to ereport.io.pciex.* */
@@ -163,7 +163,7 @@
 	PCIEX_RC_CE_MSG,	PCIE_AER_RE_STS_CE_RCVD,	NULL,
 	PCIEX_RC_MCE_MSG,	PCIE_AER_RE_STS_MUL_CE_RCVD,	NULL,
 	PCIEX_RC_MUE_MSG,	PCIE_AER_RE_STS_MUL_FE_NFE_RCVD, NULL,
-	NULL, NULL, NULL
+	NULL, 0, NULL
 };
 
 /*
@@ -175,7 +175,7 @@
 	PCIEX_RC_FE_MSG,	PCIE_DEVSTS_FE_DETECTED,	NULL,
 	PCIEX_RC_NFE_MSG,	PCIE_DEVSTS_NFE_DETECTED,	NULL,
 	PCIEX_RC_CE_MSG,	PCIE_DEVSTS_CE_DETECTED,	NULL,
-	NULL, NULL, NULL,
+	NULL, 0, NULL
 };
 
 /* ARGSUSED */
--- old/usr/src/cmd/lp/cmd/lpsched/fncs.c	Sun Dec 14 23:31:16 2014
+++ new/usr/src/cmd/lp/cmd/lpsched/fncs.c	Sun Dec 14 23:31:16 2014
@@ -898,7 +898,7 @@
 	} else if (req->file_list)
 		strlcpy(buf, *req->file_list, sizeof (buf));
 	
-	if (*buf == NULL || !strncmp(buf, SPOOLDIR, sizeof(SPOOLDIR)-1))
+	if (*buf == '\0' || !strncmp(buf, SPOOLDIR, sizeof(SPOOLDIR)-1))
 		strcpy(buf, "<File name not available>");
 
 	if (strlen(buf) > (size_t) 24) {
--- old/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_server.c	Sun Dec 14 23:31:17 2014
+++ new/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_server.c	Sun Dec 14 23:31:17 2014
@@ -234,7 +234,7 @@
 	commd_err.md_message = (uint64_t)(uintptr_t)&msg_buf[0];
 
 	(void) metaioctl(MD_MN_COMMD_ERR, &commd_err, &mne, "rpc.mdcommd");
-	(void) uadmin(A_DUMP, AD_BOOT, NULL);
+	(void) uadmin(A_DUMP, AD_BOOT, (uintptr_t)NULL);
 }
 
 static void
--- old/usr/src/cmd/mdb/common/mdb/mdb_termio.c	Sun Dec 14 23:31:17 2014
+++ new/usr/src/cmd/mdb/common/mdb/mdb_termio.c	Sun Dec 14 23:31:17 2014
@@ -350,7 +350,7 @@
 	{ "cnorm", TIO_ATTR_STR, &termio_info.ti_cnorm },
 	{ "nel", TIO_ATTR_STR, &termio_info.ti_nel },
 	{ "cr", TIO_ATTR_STR, &termio_info.ti_cr },
-	{ NULL, NULL, NULL }
+	{ NULL, 0, NULL }
 };
 
 /*
--- old/usr/src/cmd/mdb/common/modules/genunix/sysevent.c	Sun Dec 14 23:31:18 2014
+++ new/usr/src/cmd/mdb/common/modules/genunix/sysevent.c	Sun Dec 14 23:31:18 2014
@@ -181,7 +181,7 @@
 int
 sysevent_subclass_list_walk_init(mdb_walk_state_t *wsp)
 {
-	if (wsp->walk_addr == NULL) {
+	if (wsp->walk_addr == (uintptr_t)NULL) {
 		mdb_warn("sysevent_subclass_list does not support global "
 		    "walks");
 		return (WALK_ERR);
@@ -196,7 +196,7 @@
 {
 	int status;
 
-	if (wsp->walk_addr == NULL)
+	if (wsp->walk_addr == (uintptr_t)NULL)
 		return (WALK_DONE);
 
 	if (mdb_vread(wsp->walk_data, sizeof (subclass_lst_t),
@@ -230,7 +230,7 @@
 {
 	class_walk_data_t *cl_walker;
 
-	if (wsp->walk_addr == NULL) {
+	if (wsp->walk_addr == (uintptr_t)NULL) {
 		mdb_warn("sysevent_class_list does not support global walks");
 		return (WALK_ERR);
 	}
@@ -259,7 +259,7 @@
 	cl_walker = (class_walk_data_t *)wsp->walk_data;
 
 	/* Skip over empty class table entries */
-	if (wsp->walk_addr != NULL) {
+	if (wsp->walk_addr != (uintptr_t)NULL) {
 		if (mdb_vread(&clist, sizeof (class_lst_t),
 		    wsp->walk_addr) == -1) {
 			mdb_warn("failed to read class list at %p",
--- old/usr/src/cmd/mdb/common/modules/usba/usb.c	Sun Dec 14 23:31:18 2014
+++ new/usr/src/cmd/mdb/common/modules/usba/usb.c	Sun Dec 14 23:31:18 2014
@@ -98,7 +98,7 @@
 	usba_device2devinfo_cbdata_t	*cb_data =
 			    (usba_device2devinfo_cbdata_t *)cb_arg;
 
-	if ((cur_usb_dev = mdb_usba_get_usba_device(dip_addr)) == NULL) {
+	if ((cur_usb_dev = mdb_usba_get_usba_device(dip_addr)) == (uintptr_t)NULL) {
 		/*
 		 * If there's no corresponding usba_device_t, this dip isn't
 		 * a usb node.  Might be an sd node.  Ignore it.
@@ -182,7 +182,7 @@
 usba_list_walk_init(mdb_walk_state_t *wsp)
 {
 	/* Must have a start addr.  */
-	if (wsp->walk_addr == NULL) {
+	if (wsp->walk_addr == (uintptr_t)NULL) {
 		mdb_warn("not a global walk.  Starting address required\n");
 
 		return (WALK_ERR);
@@ -215,7 +215,7 @@
 	wsp->walk_addr = (uintptr_t)list_entry.next;
 
 	/* Check if we're at the last element */
-	if (wsp->walk_addr == NULL) {
+	if (wsp->walk_addr == (uintptr_t)NULL) {
 
 		return (WALK_DONE);
 	}
@@ -237,7 +237,7 @@
 int
 usb_pipe_handle_walk_init(mdb_walk_state_t *wsp)
 {
-	if (wsp->walk_addr == NULL) {
+	if (wsp->walk_addr == (uintptr_t)NULL) {
 		mdb_warn("not a global walk; usba_device_t required\n");
 
 		return (WALK_ERR);
@@ -403,7 +403,7 @@
 {
 	usba_list_entry_t	list_entry;
 
-	if (wsp->walk_addr != NULL) {
+	if (wsp->walk_addr != (uintptr_t)NULL) {
 		mdb_warn(
 		    "global walk only.  Must be invoked without an address\n");
 
@@ -437,7 +437,7 @@
 	char		pathname[MAXNAMELEN];
 	char		dname[MODMAXNAMELEN + 1] = "<unatt>"; /* Driver name */
 	char		drv_statep[MODMAXNAMELEN+ 10];
-	uint_t		usb_flag  = NULL;
+	uint_t		usb_flag  = 0;
 	boolean_t	no_driver_attached = FALSE;
 	uintptr_t	dip_addr;
 	struct dev_info	devinfo;
@@ -509,7 +509,7 @@
 
 	if (usb_flag & USB_DUMP_VERBOSE) {
 		int		i;
-		uintptr_t	statep = NULL;
+		uintptr_t	statep = (uintptr_t)NULL;
 		char		*string_descr;
 		char		**config_cloud, **conf_str_descr;
 		usb_dev_descr_t	usb_dev_descr;
@@ -717,7 +717,7 @@
 	}
 	local_debug_buf[debug_buf_size - 1] = '\0';
 
-	if (strlen(local_debug_buf) == NULL) {
+	if (strlen(local_debug_buf) == 0) {
 
 		return (DCMD_OK);
 	}
--- old/usr/src/cmd/picl/plugins/common/piclevent/picl_slm.c	Sun Dec 14 23:31:18 2014
+++ new/usr/src/cmd/picl/plugins/common/piclevent/picl_slm.c	Sun Dec 14 23:31:18 2014
@@ -344,7 +344,7 @@
 		return (EAGAIN);
 	}
 
-	if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) {
+	if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, 0)) {
 		free(ename);
 		sysevent_free(dupev);
 		return (EAGAIN);
@@ -371,7 +371,7 @@
 	if (nvlist_add_string(nvl, PICLEVENTARG_EVENT_NAME, ename) ||
 	    nvlist_add_string(nvl, PICLEVENTARG_DATA_TYPE,
 	    PICLEVENTARG_PICLEVENT_DATA) ||
-	    nvlist_pack(nvl, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) {
+	    nvlist_pack(nvl, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, 0)) {
 		free(ename);
 		nvlist_free(nvl);
 		sysevent_free(dupev);
@@ -402,7 +402,7 @@
 	(void) mutex_init(&nvq_lock, USYNC_THREAD, NULL);
 	(void) cond_init(&nvq_cv, USYNC_THREAD, NULL);
 
-	if (thr_create(NULL, NULL, piclslm_deliver_thr,
+	if (thr_create(NULL, 0, piclslm_deliver_thr,
 	    NULL, THR_BOUND, &piclslm_deliver_thr_id) != 0) {
 		(void) mutex_destroy(&nvq_lock);
 		(void) cond_destroy(&nvq_cv);
--- old/usr/src/cmd/powertop/common/powertop.c	Sun Dec 14 23:31:19 2014
+++ new/usr/src/cmd/powertop/common/powertop.c	Sun Dec 14 23:31:19 2014
@@ -149,7 +149,7 @@
 			g_gui = B_FALSE;
 			dump_count = (int)strtod(optarg, &endptr);
 
-			if (dump_count <= 0 || *endptr != NULL) {
+			if (dump_count <= 0 || *endptr != '\0') {
 				pt_usage();
 				exit(EXIT_USAGE);
 			}
@@ -165,7 +165,7 @@
 			interval = interval_usr = (double)strtod(optarg,
 			    &endptr);
 
-			if (*endptr != NULL || interval < 1 ||
+			if (*endptr != '\0' || interval < 1 ||
 			    interval > INTERVAL_MAX) {
 				pt_usage();
 				exit(EXIT_USAGE);
--- old/usr/src/cmd/powertop/common/suggestions.c	Sun Dec 14 23:31:19 2014
+++ new/usr/src/cmd/powertop/common/suggestions.c	Sun Dec 14 23:31:19 2014
@@ -268,6 +268,6 @@
 pt_sugg_as_root(void)
 {
 	pt_sugg_add("Suggestion: run as root to get suggestions"
-	    " for reducing system power consumption",  40, NULL, NULL,
+	    " for reducing system power consumption",  40, '\0', NULL,
 	    NULL);
 }
--- old/usr/src/cmd/svc/svcs/svcs.c	Sun Dec 14 23:31:19 2014
+++ new/usr/src/cmd/svc/svcs/svcs.c	Sun Dec 14 23:31:19 2014
@@ -553,7 +553,7 @@
 	int r;
 
 	r = inst_get_single_val(inst, SCF_PG_RESTARTER, pname, SCF_TYPE_TIME,
-	    tvp, NULL, ok_if_empty ? EMPTY_OK : 0, 0, 1);
+	    tvp, 0, ok_if_empty ? EMPTY_OK : 0, 0, 1);
 
 	return (r == 0 ? 0 : -1);
 }
@@ -1650,7 +1650,7 @@
 		    SCF_PROPERTY_STATE_TIMESTAMP, &tv, 0);
 	} else {
 		r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
-		    SCF_TYPE_TIME, &tv, NULL, 0);
+		    SCF_TYPE_TIME, &tv, 0, 0);
 	}
 
 	if (r != 0) {
@@ -1702,7 +1702,7 @@
 		    SCF_PROPERTY_STATE_TIMESTAMP, &tv, 0);
 	else
 		r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
-		    SCF_TYPE_TIME, &tv, NULL, 0);
+		    SCF_TYPE_TIME, &tv, 0, 0);
 
 	if (r == 0) {
 		int64_t sec;
@@ -2514,7 +2514,7 @@
 			    gettext("next_state"), buf);
 
 		if (pg_get_single_val(rpg, SCF_PROPERTY_STATE_TIMESTAMP,
-		    SCF_TYPE_TIME, &tv, NULL, 0) == 0) {
+		    SCF_TYPE_TIME, &tv, 0, 0) == 0) {
 			stime = tv.tv_sec;
 			tmp = localtime(&stime);
 			for (tbsz = 50; ; tbsz *= 2) {
--- old/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c	Sun Dec 14 23:31:20 2014
+++ new/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c	Sun Dec 14 23:31:20 2014
@@ -333,7 +333,7 @@
 	(void) mutex_init(&evq_lock, USYNC_THREAD, NULL);
 	(void) cond_init(&evq_cv, USYNC_THREAD, NULL);
 
-	if (thr_create(NULL, NULL, (void *(*)(void *))devfsadmd_deliver_thr,
+	if (thr_create(NULL, 0, (void *(*)(void *))devfsadmd_deliver_thr,
 	    NULL, THR_BOUND, &deliver_thr_id) != 0) {
 		(void) mutex_destroy(&evq_lock);
 		(void) cond_destroy(&evq_cv);
--- old/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c	Sun Dec 14 23:31:20 2014
+++ new/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c	Sun Dec 14 23:31:20 2014
@@ -232,7 +232,7 @@
 	(void) mutex_init(&evq_lock, USYNC_THREAD, NULL);
 	(void) cond_init(&evq_cv, USYNC_THREAD, NULL);
 
-	if (thr_create(NULL, NULL, (void *(*)(void *))subscriber_deliver_thr,
+	if (thr_create(NULL, 0, (void *(*)(void *))subscriber_deliver_thr,
 	    NULL, 0, &deliver_thr_id) != 0) {
 		syseventd_err_print(INIT_SUB_THR_CREATE_ERR, strerror(errno));
 		return (NULL);
--- old/usr/src/cmd/tar/tar.c	Sun Dec 14 23:31:20 2014
+++ new/usr/src/cmd/tar/tar.c	Sun Dec 14 23:31:20 2014
@@ -2646,7 +2646,7 @@
 convtoreg(off_t size)
 {
 	if ((size > 0) && (dblock.dbuf.typeflag != '0') &&
-	    (dblock.dbuf.typeflag != NULL) && (dblock.dbuf.typeflag != '1') &&
+	    (dblock.dbuf.typeflag != '\0') && (dblock.dbuf.typeflag != '1') &&
 	    (dblock.dbuf.typeflag != '2') && (dblock.dbuf.typeflag != '3') &&
 	    (dblock.dbuf.typeflag != '4') && (dblock.dbuf.typeflag != '5') &&
 	    (dblock.dbuf.typeflag != '6') && (dblock.dbuf.typeflag != 'A') &&
@@ -3159,7 +3159,7 @@
 					(void) unlink(namep);
 			}
 			linkp = templink;
-			if (*linkp !=  NULL) {
+			if (*linkp !=  '\0') {
 				if (Aflag && *linkp == '/')
 					linkp++;
 				if (link(linkp, namep) < 0) {
@@ -3200,7 +3200,7 @@
 					(void) unlink(namep);
 			}
 			linkp = templink;
-			if (*linkp != NULL) {
+			if (*linkp != '\0') {
 				if (Aflag && *linkp == '/')
 					linkp++;
 				if (link(linkp, namep) < 0) {
@@ -3249,7 +3249,7 @@
 					(void) unlink(namep);
 			}
 			linkp = templink;
-			if (*linkp != NULL) {
+			if (*linkp != '\0') {
 				if (Aflag && *linkp == '/')
 					linkp++;
 				if (link(linkp, namep) < 0) {
@@ -3389,10 +3389,10 @@
 			}
 		}
 		if (dblock.dbuf.typeflag == '0' ||
-		    dblock.dbuf.typeflag == NULL || convflag) {
+		    dblock.dbuf.typeflag == '\0' || convflag) {
 			delete_target(dirfd, comp, namep);
 			linkp = templink;
-			if (*linkp != NULL) {
+			if (*linkp != '\0') {
 				if (Aflag && *linkp == '/')
 					linkp++;
 				if (link(linkp, comp) < 0) {
@@ -3598,7 +3598,7 @@
 
 		if (pflag && newfile == TRUE && !dir &&
 		    (dblock.dbuf.typeflag == '0' ||
-		    dblock.dbuf.typeflag == NULL ||
+		    dblock.dbuf.typeflag == '\0' ||
 		    convflag || dblock.dbuf.typeflag == '1')) {
 			if (fstat(ofile, &xtractbuf) == -1)
 				(void) fprintf(stderr, gettext(
@@ -5485,7 +5485,7 @@
 
 	(void) strcpy(name, str);
 	while (name[strlen(name) - 1] == '/') {
-		name[strlen(name) - 1] = NULL;
+		name[strlen(name) - 1] = '\0';
 	}
 
 	h = hash(name);
@@ -5523,7 +5523,7 @@
 
 	(void) strcpy(name, str);
 	while (name[strlen(name) - 1] == '/') {
-		name[strlen(name) - 1] = NULL;
+		name[strlen(name) - 1] = '\0';
 	}
 
 	/*
@@ -5542,7 +5542,7 @@
 	 * check for any parent directories in the file list
 	 */
 	while ((ptr = strrchr(name, '/'))) {
-		*ptr = NULL;
+		*ptr = '\0';
 		h = hash(name);
 		exp = table[h];
 		while (exp != NULL) {
@@ -6615,7 +6615,7 @@
 					(void) unlinkat(fd, comp, 0);
 				} else if ((n = readlink(namep, buf,
 				    PATH_MAX)) != -1) {
-					buf[n] = (char)NULL;
+					buf[n] = '\0';
 					(void) unlinkat(fd, buf,
 					    AT_REMOVEDIR);
 					if (errno == ENOTDIR)
--- old/usr/src/cmd/tnf/tnfxtract/tnfxtract.c	Sun Dec 14 23:31:22 2014
+++ new/usr/src/cmd/tnf/tnfxtract/tnfxtract.c	Sun Dec 14 23:31:22 2014
@@ -128,7 +128,7 @@
 			"kvm_read error in %s\n"), dumpfile);
 		exit(1);
 	}
-	if (dump_bufaddr == NULL || tnf_bufsize == 0) {
+	if (dump_bufaddr == (uintptr_t)NULL || tnf_bufsize == 0) {
 		(void) fprintf(stderr, gettext(
 			"No trace data available in the kernel.\n"));
 		exit(1);
--- old/usr/src/head/iso/stddef_iso.h	Sun Dec 14 23:31:22 2014
+++ new/usr/src/head/iso/stddef_iso.h	Sun Dec 14 23:31:22 2014
@@ -29,6 +29,10 @@
  */
 
 /*
+ * Copyright 2014 PALO, Richard.
+ */
+
+/*
  * An application should not include this header directly.  Instead it
  * should be included only through the inclusion of other Sun headers.
  *
@@ -43,9 +47,8 @@
 #ifndef _ISO_STDDEF_ISO_H
 #define	_ISO_STDDEF_ISO_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI" /* SVr4.0 1.5 */
-
 #include <sys/isa_defs.h>
+#include <sys/null.h>
 
 #ifdef	__cplusplus
 extern "C" {
@@ -55,14 +58,6 @@
 namespace std {
 #endif
 
-#ifndef	NULL
-#if defined(_LP64)
-#define	NULL    0L
-#else
-#define	NULL    0
-#endif
-#endif
-
 #if !defined(_PTRDIFF_T) || __cplusplus >= 199711L
 #define	_PTRDIFF_T
 #if defined(_LP64) || defined(_I32LPx)
--- old/usr/src/head/unistd.h	Sun Dec 14 23:31:22 2014
+++ new/usr/src/head/unistd.h	Sun Dec 14 23:31:22 2014
@@ -31,11 +31,16 @@
 
 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
 
+/*
+ * Copyright 2014 PALO, Richard.
+ */
+
 #ifndef _UNISTD_H
 #define	_UNISTD_H
 
 #include <sys/feature_tests.h>
 
+#include <sys/null.h>
 #include <sys/types.h>
 #include <sys/unistd.h>
 
@@ -178,14 +183,6 @@
 #define	_POSIX_VDISABLE		0
 #endif
 
-#ifndef NULL
-#if defined(_LP64)
-#define	NULL	0L
-#else
-#define	NULL	0
-#endif
-#endif
-
 #define	STDIN_FILENO	0
 #define	STDOUT_FILENO	1
 #define	STDERR_FILENO	2
--- old/usr/src/lib/cfgadm_plugins/pci/common/cfga.c	Sun Dec 14 23:31:23 2014
+++ new/usr/src/lib/cfgadm_plugins/pci/common/cfga.c	Sun Dec 14 23:31:23 2014
@@ -1083,7 +1083,7 @@
 				if ((strncmp(str, func_strs[MODE], len) == 0) &&
 				    (*(str+(len)) == '=')) {
 				    for (str = (str+(++len)), i = 0;
-					*str != NULL; i++, str++) {
+					*str != '\0'; i++, str++) {
 						buf[i] = *str;
 
 				    }
@@ -1281,7 +1281,7 @@
 	if ((root_node = di_init("/", DINFOCPYALL|DINFOPATH))
 		== DI_NODE_NIL) {
 		DBG(1, ("di_init() failed\n"));
-		return (NULL);
+		return (0);
 	}
 
 	slotarg->devpath = (char *)devcomp;
@@ -1289,7 +1289,7 @@
 	if ((slotarg->promp = di_prom_init()) == DI_PROM_HANDLE_NIL) {
 		DBG(1, ("di_prom_init() failed\n"));
 		di_fini(root_node);
-		return (NULL);
+		return (0);
 	}
 
 	(void) di_walk_minor(root_node, "ddi_ctl:attachment_point:pci",
--- old/usr/src/lib/cfgadm_plugins/shp/common/shp.c	Sun Dec 14 23:31:23 2014
+++ new/usr/src/lib/cfgadm_plugins/shp/common/shp.c	Sun Dec 14 23:31:23 2014
@@ -953,7 +953,7 @@
 				if ((strncmp(str, func_strs[MODE], len) == 0) &&
 				    (*(str+(len)) == '=')) {
 					for (str = (str+(++len)), i = 0;
-					    *str != NULL; i++, str++) {
+					    *str != '\0'; i++, str++) {
 						buf[i] = *str;
 					}
 				}
--- old/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c	Sun Dec 14 23:31:23 2014
+++ new/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c	Sun Dec 14 23:31:23 2014
@@ -429,7 +429,7 @@
 		}
 	}
 
-	return (NULL);
+	return (0);
 }
 
 int
@@ -451,7 +451,7 @@
 
 		free(buf);
 		(void) close(mc_fd);
-		return (NULL);
+		return (0);
 	}
 	(void) close(mc_fd);
 	(void) nvlist_unpack(buf, mcs.mcs_size, &nvl, 0);
@@ -460,11 +460,11 @@
 	if (nvlist_lookup_uint8(nvl, MCINTEL_NVLIST_VERSTR, &ver) != 0) {
 		whinge(mod, NULL, "mc nvlist is not versioned\n");
 		nvlist_free(nvl);
-		return (NULL);
+		return (0);
 	} else if (ver != MCINTEL_NVLIST_VERS0) {
 		whinge(mod, NULL, "mc nvlist version mismatch\n");
 		nvlist_free(nvl);
-		return (NULL);
+		return (0);
 	}
 
 	rc = mc_nb_create(mod, chip_smbid, pnode, name, auth, nvl);
--- old/usr/src/lib/gss_mechs/mech_krb5/crypto/des/afsstring2key.c	Sun Dec 14 23:31:24 2014
+++ new/usr/src/lib/gss_mechs/mech_krb5/crypto/des/afsstring2key.c	Sun Dec 14 23:31:24 2014
@@ -382,7 +382,7 @@
 	for(i=0; i<66; i++)
 		block[i] = 0;
 	/* Solaris Kerberos */
-	for(i=0; ((c= *pw) != NULL) && i<64; pw++){
+	for(i=0; ((c= *pw) != 0) && i<64; pw++){
 		for(j=0; j<7; j++, i++)
 			block[i] = (c>>(6-j)) & 01;
 		i++;
--- old/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/vfy_increds.c	Sun Dec 14 23:31:24 2014
+++ new/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/vfy_increds.c	Sun Dec 14 23:31:24 2014
@@ -19,18 +19,18 @@
 
    flags = 0;				/* turns off OPENCLOSE mode */
    /* Solaris Kerberos */
-   if ((code = krb5_cc_set_flags(context, incc, flags)) != NULL)
+   if ((code = krb5_cc_set_flags(context, incc, flags)) != 0)
       return(code);
    /* Solaris Kerberos */
-   if ((code = krb5_cc_set_flags(context, outcc, flags)) != NULL)
+   if ((code = krb5_cc_set_flags(context, outcc, flags)) != 0)
       return(code);
 
    /* Solaris Kerberos */
-   if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != NULL)
+   if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != 0)
       goto cleanup;
 
    /* Solaris Kerberos */
-   while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == NULL) {
+   while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == 0) {
       if (krb5_principal_compare(context, princ, creds.server))
 	 continue;
 
@@ -165,11 +165,11 @@
       if ((ret = krb5_cc_resolve(context, "MEMORY:rd_req", &ccache)))
 	 goto cleanup;
       /* Solaris Kerberos */
-      if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != NULL)
+      if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != 0)
 	 goto cleanup;
 
       /* Solaris Kerberos */
-      if ((ret = krb5_cc_store_cred(context, ccache, creds)) != NULL)
+      if ((ret = krb5_cc_store_cred(context, ccache, creds)) != 0)
 	 goto cleanup;
 
       /* set up for get_creds */
@@ -212,10 +212,10 @@
 	   retcc = NULL;
 
 	   /* Solaris Kerberos */
-	   if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != NULL) ||
-	       ((ret = krb5_cc_initialize(context, retcc, creds->client)) != NULL) ||
+	   if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != 0) ||
+	       ((ret = krb5_cc_initialize(context, retcc, creds->client)) != 0) ||
 	       ((ret = krb5_cc_copy_creds_except(context, ccache, retcc,
-						creds->server)) != NULL)) {
+						creds->server)) != 0)) {
 	       /* Solaris Kerberos */
 	       if (retcc)
 		   (void) krb5_cc_destroy(context, retcc);
--- old/usr/src/lib/libc/port/gen/getopt.c	Sun Dec 14 23:31:24 2014
+++ new/usr/src/lib/libc/port/gen/getopt.c	Sun Dec 14 23:31:24 2014
@@ -199,7 +199,7 @@
 		if (optind >= argc || argv[optind][0] != '-' ||
 		    argv[optind] == NULL || argv[optind][1] == '\0')
 			return (EOF);
-		else if (strcmp(argv[optind], "--") == NULL) {
+		else if (strcmp(argv[optind], "--") == 0) {
 			optind++;
 			return (EOF);
 		}
--- old/usr/src/lib/libdtrace/common/dt_handle.c	Sun Dec 14 23:31:25 2014
+++ new/usr/src/lib/libdtrace/common/dt_handle.c	Sun Dec 14 23:31:25 2014
@@ -247,7 +247,7 @@
 	err.dteda_action = -1;
 	err.dteda_offset = -1;
 	err.dteda_fault = DTRACEFLT_LIBRARY;
-	err.dteda_addr = NULL;
+	err.dteda_addr = 0L;
 
 	len = strlen(faultstr) +
 	    strlen(errpd->dtpd_provider) + strlen(errpd->dtpd_mod) +
--- old/usr/src/lib/libscf/common/midlevel.c	Sun Dec 14 23:31:25 2014
+++ new/usr/src/lib/libscf/common/midlevel.c	Sun Dec 14 23:31:25 2014
@@ -1342,7 +1342,7 @@
 	}
 
 	if (scf_handle_decode_fmri(ret->h, fmri, NULL, NULL, ret->inst,
-	    NULL, NULL, NULL) == -1) {
+	    NULL, NULL, 0) == -1) {
 		goto out;
 	}
 
--- old/usr/src/lib/libtnfctl/elf.c	Sun Dec 14 23:31:25 2014
+++ new/usr/src/lib/libtnfctl/elf.c	Sun Dec 14 23:31:25 2014
@@ -87,7 +87,7 @@
 	Elf3264_Dyn	*dynam_tab = NULL;
 	long		dynam_tab_size;
 
-	*entaddr_p = NULL;
+	*entaddr_p = (uintptr_t)NULL;
 
 	prbstat = prb_mainobj_get(hndl->proc_p, &objfd, &baseaddr);
 	if (prbstat)
--- old/usr/src/lib/libumem/common/misc.c	Sun Dec 14 23:31:26 2014
+++ new/usr/src/lib/libumem/common/misc.c	Sun Dec 14 23:31:26 2014
@@ -244,7 +244,7 @@
 	int result;
 	Dl_info sym_info;
 
-	uintptr_t end = NULL;
+	uintptr_t end = (uintptr_t)NULL;
 
 	Sym *ext_info = NULL;
 
--- old/usr/src/pkg/manifests/system-header.mf	Sun Dec 14 23:31:26 2014
+++ new/usr/src/pkg/manifests/system-header.mf	Sun Dec 14 23:31:26 2014
@@ -1261,6 +1261,7 @@
 file path=usr/include/sys/netstack.h
 file path=usr/include/sys/nexusdefs.h
 file path=usr/include/sys/note.h
+file path=usr/include/sys/null.h
 file path=usr/include/sys/nvpair.h
 file path=usr/include/sys/nvpair_impl.h
 file path=usr/include/sys/objfs.h
--- old/usr/src/uts/common/gssapi/mechs/krb5/crypto/cksumtypes.c	Sun Dec 14 23:31:26 2014
+++ new/usr/src/uts/common/gssapi/mechs/krb5/crypto/cksumtypes.c	Sun Dec 14 23:31:26 2014
@@ -38,7 +38,7 @@
 const struct krb5_cksumtypes krb5_cksumtypes_list[] = {
     { CKSUMTYPE_CRC32, KRB5_CKSUMFLAG_NOT_COLL_PROOF,
       "crc32", "CRC-32",
-      NULL, NULL, &krb5int_hash_crc32, 0,
+      0, NULL, &krb5int_hash_crc32, 0,
 #ifdef _KERNEL
       NULL,
       CRYPTO_MECH_INVALID
@@ -48,7 +48,7 @@
     { CKSUMTYPE_DESCBC, 0,
       "des-cbc", "DES cbc mode",
       ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_descbc,
-      NULL,  NULL,
+      NULL, 0,
 #ifdef _KERNEL
       NULL,
       CRYPTO_MECH_INVALID
@@ -57,7 +57,7 @@
 
     { CKSUMTYPE_RSA_MD5, 0,
       "md5", "RSA-MD5",
-      NULL, NULL, &krb5int_hash_md5, 0,
+      0, NULL, &krb5int_hash_md5, 0,
 #ifdef _KERNEL
       SUN_CKM_MD5,
       CRYPTO_MECH_INVALID
@@ -66,7 +66,7 @@
     { CKSUMTYPE_RSA_MD5_DES, 0,
       "md5-des", "RSA-MD5 with DES cbc mode",
       ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_md5des,
-      NULL, NULL,
+      NULL, 0,
 #ifdef _KERNEL
       SUN_CKM_MD5,
       CRYPTO_MECH_INVALID
@@ -75,7 +75,7 @@
 
     { CKSUMTYPE_NIST_SHA, 0,
       "sha", "NIST-SHA",
-      NULL, NULL, &krb5int_hash_sha1, 0,
+      0, NULL, &krb5int_hash_sha1, 0,
 #ifdef _KERNEL
       SUN_CKM_SHA1,
       CRYPTO_MECH_INVALID
@@ -84,7 +84,7 @@
 
     { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE,
       "hmac-sha1-des3", "HMAC-SHA1 DES3 key",
-      NULL, NULL, &krb5int_hash_sha1, 0,
+      0, NULL, &krb5int_hash_sha1, 0,
 #ifdef _KERNEL
       SUN_CKM_SHA1_HMAC,
       CRYPTO_MECH_INVALID
@@ -92,7 +92,7 @@
  },
     { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE,
       "hmac-sha1-des3-kd", "HMAC-SHA1 DES3 key", /* alias */
-      NULL, NULL, &krb5int_hash_sha1, 0,
+      0, NULL, &krb5int_hash_sha1, 0,
 #ifdef _KERNEL
       SUN_CKM_SHA1_HMAC,
       CRYPTO_MECH_INVALID
@@ -128,7 +128,7 @@
 
     { CKSUMTYPE_HMAC_SHA1_96_AES128, KRB5_CKSUMFLAG_DERIVE,
       "hmac-sha1-96-aes128", "HMAC-SHA1 AES128 key",
-	NULL, NULL, &krb5int_hash_sha1, 12,
+       0, NULL, &krb5int_hash_sha1, 12,
 #ifdef _KERNEL
       SUN_CKM_SHA1_HMAC,
       CRYPTO_MECH_INVALID
@@ -136,7 +136,7 @@
     },
     { CKSUMTYPE_HMAC_SHA1_96_AES256, KRB5_CKSUMFLAG_DERIVE,
       "hmac-sha1-96-aes256", "HMAC-SHA1 AES256 key",
-	0, NULL, &krb5int_hash_sha1, 12,
+       0, NULL, &krb5int_hash_sha1, 12,
 #ifdef _KERNEL
       SUN_CKM_SHA1_HMAC,
       CRYPTO_MECH_INVALID
--- old/usr/src/uts/common/gssapi/mechs/krb5/crypto/etypes.c	Sun Dec 14 23:31:27 2014
+++ new/usr/src/uts/common/gssapi/mechs/krb5/crypto/etypes.c	Sun Dec 14 23:31:27 2014
@@ -101,8 +101,7 @@
     { ENCTYPE_DES_CBC_RAW,
       "des-cbc-raw", "DES cbc mode raw",
       &krb5int_enc_des, NULL,
-      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt,
-      NULL,
+      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt, 0,
 #ifndef _KERNEL
       krb5int_des_string_to_key,
 #else
@@ -116,8 +115,7 @@
     { ENCTYPE_DES3_CBC_RAW,
       "des3-cbc-raw", "Triple DES cbc mode raw",
       &krb5int_enc_des3, NULL,
-      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt,
-      NULL,
+      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt, 0,
 #ifndef _KERNEL
       krb5int_dk_string_to_key,
 #else
@@ -191,8 +189,7 @@
     { ENCTYPE_DES_HMAC_SHA1,
       "des-hmac-sha1", "DES with HMAC/sha1",
       &krb5int_enc_des, &krb5int_hash_sha1,
-      krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt,
-      NULL,
+      krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt, 0,
 #ifndef _KERNEL
       krb5int_dk_string_to_key,
 #else
--- old/usr/src/uts/common/sys/Makefile	Sun Dec 14 23:31:27 2014
+++ new/usr/src/uts/common/sys/Makefile	Sun Dec 14 23:31:27 2014
@@ -409,6 +409,7 @@
 	netstack.h		\
 	nexusdefs.h		\
 	note.h			\
+	null.h			\
 	nvpair.h		\
 	nvpair_impl.h		\
 	objfs.h			\
--- /dev/null	Sun Dec 14 23:31:27 2014
+++ new/usr/src/uts/common/sys/null.h	Sun Dec 14 23:31:27 2014
@@ -0,0 +1,50 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2003 Marcel Moolenaar.  All rights reserved.
+ * Copyright 2014 PALO, Richard.
+ */
+
+#ifndef _SYS_NULL_H
+#define	_SYS_NULL_H
+
+#ifndef	NULL
+
+#if !defined(__cplusplus)
+#define	NULL    ((void *)0)
+#else
+#if __cplusplus >= 201103L
+#define	NULL    nullptr
+#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
+#define	NULL    __null
+#else
+#if defined(_LP64)
+#define	NULL    (0L)
+#else
+#define	NULL    0
+#endif	/* _LP64 */
+#endif	/* __GNUG__ */
+#endif	/* !__cplusplus */
+
+#endif
+
+#endif	/* _SYS_NULL_H */
