[leafnode-list] Re: Compilation failure leafnode-2.0.0.alpha20090908a.luascript

Matthias Andree matthias.andree at gmx.de
Tue Oct 27 10:47:33 CET 2009


Am 27.10.2009, 08:48 Uhr, schrieb andrew <andrew.david.45 at gmail.com>:

> Hi,
>
> I am attempting to compile leafnode-2.0.0.alpha20090908a.luascript
> under Karmic Koala and:
>
> +--------
> andrew at skamandros:~$ gcc --version
> gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1
> +-------
>
> Compilation fails with the following error message:
>
> +----------
> -MT arc4random.o -MD -MP -MF .deps/arc4random.Tpo -c -o arc4random.o  
> arc4random.c
> In file included from arc4random.h:4,
>                  from arc4random.c:34:
> system.h:23:7: warning: "sizeof" is not defined
> system.h:23:13: error: missing binary operator before token "("
> arc4random.c: In function ‘arc4_stir’:
> arc4random.c:87: warning: ignoring return value of ‘read’, declared with  
> attribute warn_unused_result
> make: *** [arc4random.o] Error 1
> +-----------
>
> Please let me know if there is more information I need to provide to
> shed light on this error.

Hi Andrew, sorry for that. Please use the patch below for the nonce.
I think the code shouldn't be using sizeof in preprocessor statements.

diff --git a/system.h b/system.h
index a460297..189a3cd 100644
--- a/system.h
+++ b/system.h
@@ -20,9 +20,6 @@
  #include <inttypes.h>
  #elif HAVE_STDINT_H
  #include <stdint.h>
-#elif sizeof(unsigned long) == 4 && sizeof(unsigned char) == 1
-typedef unsigned long uint32_t;
-typedef unsigned char uint8_t;
  #else
  #error "I cannot figure how to define uint32_t and uint8_t."
  #endif


-- 
Matthias Andree



More information about the leafnode-list mailing list