Package: twinkle
Version: fix build on 32 bit arches
Severity: wishlist
Tags: patch

Hi,
this patch fixes the ppc build...

--- tmp/twinkle-0.2.1/src/stun/stun.cxx 2005-07-28 22:46:57.000000000 +0200
+++ twinkle-0.2.1/src/stun/stun.cxx     2005-08-25 21:42:52.000000000 +0200
@@ -676,10 +676,14 @@
       asm("rdtsc" : "=A" (tick));
 #elif defined (__SUNPRO_CC) || defined( __sparc__ )    
       tick = gethrtime();
-#elif defined(__MACH__) 
+#elif defined(__MACH__)
       int fd=open("/dev/random",O_RDONLY);
       read(fd,&tick,sizeof(tick));
       closesocket(fd);
+#elif defined (__linux__)
+      int fd=open("/dev/urandom",O_RDONLY);
+      read(fd,&tick,sizeof(tick));
+      close(fd);
 #else
 #     error Need some way to seed the random number generator 
 #endif 

...it should also fix the build for other 32bit linux architectures.
Please enable these for future builds.
Cheers,
 -- Guido

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc3-agx0
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to