diff --git a/src/conio/Common.gmake b/src/conio/Common.gmake
index 6dbe3fccfa0436fa0974f41a8fc00550b98f0243..f4b3a303e228b7835106b79c993293aeb91ef08e 100644
--- a/src/conio/Common.gmake
+++ b/src/conio/Common.gmake
@@ -34,8 +34,13 @@ else
   CURSES_LDFLAGS += -lncurses
   CURSES_CFLAGS	+= -DN_CURSES_LIB
  else
-  CURSES_LDFLAGS += -lcurses
-  CURSES_CFLAGS	+= -DCURSES_LIB
+  ifeq ($(os),sunos)
+   CURSES_LDFLAGS += -lncurses
+   CURSES_CFLAGS	+= -DN_CURSES_LIB
+  else
+   CURSES_LDFLAGS += -lcurses
+   CURSES_CFLAGS	+= -DCURSES_LIB
+  endif
  endif
 endif
 
diff --git a/src/conio/console.c b/src/conio/console.c
index b78420de35595e0bd7e744a1213267dada359c88..19ec879bc3eaf2135bc2b7d31c427ad5cd3d8e96 100644
--- a/src/conio/console.c
+++ b/src/conio/console.c
@@ -1110,9 +1110,9 @@ init_mode(int mode)
     pidx = vmode.paramindex;
 
     /* Preset VGA registers. */
-    memcpy(VGA_CRTC, (u_int8_t *)&videoparams[pidx][CRTC_Ofs],
+    memcpy(VGA_CRTC, (unsigned char *)&videoparams[pidx][CRTC_Ofs],
 	   sizeof(VGA_CRTC));
-    memcpy(VGA_ATC, (u_int8_t *)&videoparams[pidx][ATC_Ofs],
+    memcpy(VGA_ATC, (unsigned char *)&videoparams[pidx][ATC_Ofs],
 	   sizeof(VGA_ATC));
 
     VideoMode=mode & 0x7f;
diff --git a/src/conio/vparams.h b/src/conio/vparams.h
index 0a94c7dec5f7ab279f8d030ee52f8204302ace0f..de06dd1d8523cc10ff3a9ecf286da1a4fde79fcd 100644
--- a/src/conio/vparams.h
+++ b/src/conio/vparams.h
@@ -36,7 +36,7 @@
    supposed to be included only from 'video.c' and needs some type definitions
    from 'video.h'. */
 
-u_int8_t videoparams[][64] = {
+unsigned char videoparams[][64] = {
 	/* Mode 0: Text, 40x25, CGA (200 lines) */
 	{ 0x28, 0x18, 0x08, 0x00, 0x08, 0x09, 0x03, 0x00,
 	  0x02, 0x63, 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0,
@@ -461,7 +461,7 @@ struct dac_colors dac_default256[] = {
 
 /* The Static Functionality Table, a collection of mode-independent status
    info. */
-u_int8_t static_functionality_table[] = {
+unsigned char static_functionality_table[] = {
 	0x0c,			/* Video modes 0 - 7 */
 	0,			/* Video modes 8 - 15 */
 	0,			/* Video modes 16 - 23 */