[package] add missing muninlite patch after 1.0.2 update
[openwrt/svn-archive/archive.git] / net / stun / patches / 001-fix_non_i386.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## fix_non_i386.dpatch by Kilian Krause <kilian@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Remove i386-only code analogous to twinkle
6 @DPATCH@
7 diff -urNad stun-0.96~/stun.cxx stun-0.96/stun.cxx
8 --- stun-0.96~/stun.cxx 2005-08-14 00:39:03.000000000 +0000
9 +++ stun-0.96/stun.cxx 2006-01-03 00:54:33.000000000 +0000
10 @@ -669,16 +669,8 @@
11 tick = hightick;
12 tick <<= 32;
13 tick |= lowtick;
14 -#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) )
15 - asm("rdtsc" : "=A" (tick));
16 -#elif defined (__SUNPRO_CC) || defined( __sparc__ )
17 - tick = gethrtime();
18 -#elif defined(__MACH__)
19 - int fd=open("/dev/random",O_RDONLY);
20 - read(fd,&tick,sizeof(tick));
21 - closesocket(fd);
22 #else
23 -# error Need some way to seed the random number generator
24 + tick = time(NULL);
25 #endif
26 int seed = int(tick);
27 #ifdef WIN32