[DGD] Errors compiling 1.4.10

Greg Lewis glewis at eyesbeyond.com
Sat Jul 30 09:51:37 CEST 2011


While trying to update the FreeBSD port of dgd to 1.4.10.

First one:

cc -I. -Icomp -Ilex -Ied -Iparser -Ikfun -DFREEBSD  -DNETWORK_EXTENSIONS -DDUMP_FUNCS -DLPC_EXTENSION -c swap.c
swap.c: In function 'sw_init':
swap.c:67: error: expected ')' before '{' token
swap.c:101: error: expected expression before '}' token
*** Error code 1

Fixed with:

--- work/dgd/src/swap.c.orig	2011-07-30 00:35:13.000000000 -0700
+++ work/dgd/src/swap.c	2011-07-30 00:36:15.000000000 -0700
@@ -64,7 +64,7 @@
     slotsize = sizeof(header) + secsize;
 
     /* sanity check */
-    if (cache >= total || ((cache * slotsize) / cache != slotsize) {
+    if (cache >= total || ((cache * slotsize) / cache) != slotsize) {
 	P_message("Config error: swap cache too big\012"); /* LF */
 	return 0;
     }

Second one:

cc -I. -I.. -I../lex -I../parser -I../kfun -DFREEBSD  -DNETWORK_EXTENSIONS -DDUMP_FUNCS -DLPC_EXTENSION -c comp.c
comp.c:468: error: conflicting types for 'sw_init'
../swap.h:21: error: previous declaration of 'sw_init' was here
*** Error code 1

Fixed with:

--- work/dgd/src/comp/comp.c.orig	2011-07-30 00:42:08.000000000 -0700
+++ work/dgd/src/comp/comp.c	2011-07-30 00:42:17.000000000 -0700
@@ -464,7 +464,7 @@
  * NAME:	swap->init()
  * DESCRIPTION:	pretend to initialize the swap device
  */
-void sw_init(char *file, unsigned int total, unsigned int cache, unsigned int secsize)
+bool sw_init(char *file, unsigned int total, unsigned int cache, unsigned int secsize)
 {
 }
 
I didn't see these reported already.

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org



More information about the DGD mailing list