The HP-UX ansi C-compiler does not allow a+b when a is void* and b is int. This 
causes compilation of src/cfshow.c to fail on HP-UX. GCC and others allow it, 
and will treat the void pointer like a char pointer. 


Simple patch:

--- cfshow.c    Tue Aug 14 16:17:47 2007
+++ cfshow.c.new        Tue Aug 14 16:17:34 2007
@@ -447,7 +447,7 @@
     memcpy(digest,chk_val.mess_digest,EVP_MAX_MD_SIZE+1);
     strncpy(strtype,key.data,CF_MAXDIGESTNAMELEN);
-    strncpy(name,key.data+CF_CHKSUMKEYOFFSET,CF_BUFSIZE-1);
+    strncpy(name,(char *)key.data+CF_CHKSUMKEYOFFSET,CF_BUFSIZE-1);
     type = ChecksumType(strtype);
 

It might be better to make the 'key.data' something other than void *. Just 
something to consider.

Tested on HP-UX IA-64 11.23 and HP-UX PA-risc 11.00 with HP aCC A.06.06.
 

Cheers, 

PER
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to