Index: boot/generic/include/typedefs.h
===================================================================
--- boot/generic/include/typedefs.h	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ boot/generic/include/typedefs.h	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -37,5 +37,5 @@
 #include <arch/types.h>
 
-#define NULL  0
+#define NULL	((void *) 0)
 
 #define false  0
Index: kernel/arch/amd64/src/debugger.c
===================================================================
--- kernel/arch/amd64/src/debugger.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/arch/amd64/src/debugger.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -260,5 +260,5 @@
 	}
 	
-	cur->address = NULL;
+	cur->address = (uintptr_t) NULL;
 	
 	setup_dr(slot);
@@ -313,5 +313,5 @@
 	unsigned int i;
 	for (i = 0; i < BKPOINTS_MAX; i++)
-		breakpoints[i].address = NULL;
+		breakpoints[i].address = (uintptr_t) NULL;
 	
 #ifdef CONFIG_KCONSOLE
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/arch/mips32/src/debugger.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -247,5 +247,5 @@
 	smc_coherence(((uint32_t *) cur->address)[1]);
 	
-	cur->address = NULL;
+	cur->address = (uintptr_t) NULL;
 	
 	irq_spinlock_unlock(&bkpoint_lock, true);
@@ -289,5 +289,5 @@
 	
 	for (i = 0; i < BKPOINTS_MAX; i++)
-		breakpoints[i].address = NULL;
+		breakpoints[i].address = (uintptr_t) NULL;
 	
 #ifdef CONFIG_KCONSOLE
@@ -417,5 +417,5 @@
 		/* Remove one-shot breakpoint */
 		if ((cur->flags & BKPOINT_ONESHOT))
-			cur->address = NULL;
+			cur->address = (uintptr_t) NULL;
 		
 		/* Remove in-progress flag */
Index: kernel/arch/sparc64/src/mm/sun4u/frame.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/frame.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/arch/sparc64/src/mm/sun4u/frame.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -41,5 +41,5 @@
 #include <macros.h>
 
-uintptr_t last_frame = NULL;
+uintptr_t last_frame = (uintptr_t) NULL;
 
 /** Create memory zones according to information stored in memmap.
Index: kernel/generic/include/typedefs.h
===================================================================
--- kernel/generic/include/typedefs.h	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/generic/include/typedefs.h	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -40,5 +40,5 @@
 #include <arch/types.h>
 
-#define NULL  0UL
+#define NULL	((void *) 0)
 
 #define false  0
Index: kernel/generic/src/main/main.c
===================================================================
--- kernel/generic/src/main/main.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/generic/src/main/main.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -97,5 +97,5 @@
 /** Boot allocations. */
 ballocs_t ballocs = {
-	.base = NULL,
+	.base = (uintptr_t) NULL,
 	.size = 0
 };
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/generic/src/mm/as.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -312,5 +312,5 @@
 	 *
 	 */
-	if (overlaps(va, size, NULL, PAGE_SIZE))
+	if (overlaps(va, size, (uintptr_t) NULL, PAGE_SIZE))
 		return false;
 	
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/generic/src/mm/frame.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -878,5 +878,5 @@
 		 * the assert
 		 */
-		ASSERT(confframe != NULL);
+		ASSERT(confframe != ADDR2PFN((uintptr_t ) NULL));
 		
 		/* If confframe is supposed to be inside our zone, then make sure
@@ -1104,5 +1104,5 @@
 	 */
 	pfn_t pfn = ADDR2PFN(frame);
-	size_t znum = find_zone(pfn, 1, NULL);
+	size_t znum = find_zone(pfn, 1, 0);
 	
 	ASSERT(znum != (size_t) -1);
@@ -1141,5 +1141,5 @@
 	 * First, find host frame zone for addr.
 	 */
-	size_t znum = find_zone(pfn, 1, NULL);
+	size_t znum = find_zone(pfn, 1, 0);
 	
 	ASSERT(znum != (size_t) -1);
Index: kernel/generic/src/synch/smc.c
===================================================================
--- kernel/generic/src/synch/smc.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ kernel/generic/src/synch/smc.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -44,5 +44,5 @@
 unative_t sys_smc_coherence(uintptr_t va, size_t size)
 {
-	if (overlaps(va, size, NULL, PAGE_SIZE))
+	if (overlaps(va, size, (uintptr_t) NULL, PAGE_SIZE))
 		return EINVAL;
 
Index: uspace/app/bdsh/cmds/builtins/builtins.h
===================================================================
--- uspace/app/bdsh/cmds/builtins/builtins.h	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/app/bdsh/cmds/builtins/builtins.h	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -10,5 +10,5 @@
 #include "cd/cd_def.h"
 #include "exit/exit_def.h"
-	{NULL, NULL, NULL, NULL, NULL}
+	{NULL, NULL, NULL, NULL, 0}
 };
 
Index: uspace/app/nettest1/nettest1.c
===================================================================
--- uspace/app/nettest1/nettest1.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/app/nettest1/nettest1.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -388,5 +388,5 @@
 		return ENOMEM;
 	}
-	socket_ids[sockets] = NULL;
+	socket_ids[sockets] = 0;
 
 	if (verbose)
Index: uspace/app/nettest2/nettest2.c
===================================================================
--- uspace/app/nettest2/nettest2.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/app/nettest2/nettest2.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -336,5 +336,5 @@
 		return ENOMEM;
 	}
-	socket_ids[sockets] = NULL;
+	socket_ids[sockets] = 0;
 
 	if (verbose)
Index: uspace/lib/c/arch/abs32le/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/stacktrace.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/lib/c/arch/abs32le/src/stacktrace.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -56,10 +56,10 @@
 uintptr_t stacktrace_fp_get(void)
 {
-	return NULL;
+	return (uintptr_t) NULL;
 }
 
 uintptr_t stacktrace_pc_get(void)
 {
-	return NULL;
+	return (uintptr_t) NULL;
 }
 
Index: uspace/lib/c/arch/abs32le/src/tls.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/tls.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/lib/c/arch/abs32le/src/tls.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -46,5 +46,5 @@
 uintptr_t __aeabi_read_tp(void)
 {
-	return NULL;
+	return (uintptr_t) NULL;
 }
 
Index: uspace/lib/c/generic/async.c
===================================================================
--- uspace/lib/c/generic/async.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/lib/c/generic/async.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -536,5 +536,5 @@
 		if (callid)
 			ipc_answer_0(callid, ENOMEM);
-		return NULL;
+		return (uintptr_t) NULL;
 	}
 	
@@ -556,5 +556,5 @@
 		if (callid)
 			ipc_answer_0(callid, ENOMEM);
-		return NULL;
+		return (uintptr_t) NULL;
 	}
 	
Index: uspace/lib/c/generic/io/klog.c
===================================================================
--- uspace/lib/c/generic/io/klog.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/lib/c/generic/io/klog.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -52,5 +52,5 @@
 void klog_update(void)
 {
-	(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0);
+	(void) __SYSCALL3(SYS_KLOG, 1, (uintptr_t) NULL, 0);
 }
 
Index: uspace/lib/c/include/unistd.h
===================================================================
--- uspace/lib/c/include/unistd.h	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/lib/c/include/unistd.h	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -41,5 +41,5 @@
 
 #ifndef NULL
-	#define NULL  0UL
+	#define NULL	((void *) 0)
 #endif
 
Index: uspace/srv/hid/kbd/genarch/gsp.c
===================================================================
--- uspace/srv/hid/kbd/genarch/gsp.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/srv/hid/kbd/genarch/gsp.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -198,6 +198,6 @@
 	if (t == NULL) {
 		printf("gsp_step: not found\n");
-		*mods = NULL;
-		*key = NULL;
+		*mods = 0;
+		*key = 0;
 		return 0;
 	}
Index: uspace/srv/hw/netif/dp8390/dp8390.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/srv/hw/netif/dp8390/dp8390.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -432,5 +432,5 @@
 	dep->de_write_iovec.iod_iovec[0].iov_size = size;
 	dep->de_write_iovec.iod_iovec_s = 1;
-	dep->de_write_iovec.iod_iovec_addr = NULL;
+	dep->de_write_iovec.iod_iovec_addr = (uintptr_t) NULL;
 
 	if (size < ETH_MIN_PACK_SIZE || size > ETH_MAX_PACK_SIZE_TAGGED)
@@ -1015,5 +1015,5 @@
 	dep->de_read_iovec.iod_iovec[0].iov_size = length;
 	dep->de_read_iovec.iod_iovec_s = 1;
-	dep->de_read_iovec.iod_iovec_addr = NULL;
+	dep->de_read_iovec.iod_iovec_addr = (uintptr_t) NULL;
 
 	last = page + (length - 1) / DP_PAGESIZE;
Index: uspace/srv/hw/netif/dp8390/dp8390_module.c
===================================================================
--- uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision a9c6b966d7358b2a28df7df4daa72fa52f1a9f35)
+++ uspace/srv/hw/netif/dp8390/dp8390_module.c	(revision 0b4a67a31961a80515a7b28d5b2e27fbb8f7249d)
@@ -127,5 +127,5 @@
 		dep->received_count = 0;
 		fibril_rwlock_write_unlock(&netif_globals.lock);
-		nil_received_msg(phone, device_id, received, NULL);
+		nil_received_msg(phone, device_id, received, SERVICE_NONE);
 	}else{
 		fibril_rwlock_write_unlock(&netif_globals.lock);
