]>
Commit | Line | Data |
---|---|---|
0d9e0091 JR |
1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
2 | ## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian@gmail.com> | |
3 | ## | |
4 | ## All lines beginning with `## DP:' are a description of the patch. | |
5 | ## DP: A solution to solve the bug #535361 | |
6 | ## May be this will be a solution with the right method ??? | |
7 | ||
8 | @DPATCH@ | |
9 | diff -urNad src/get_myipaddr.c trunk/src/get_myipaddr.c | |
10 | --- src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200 | |
11 | +++ src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200 | |
12 | @@ -118,7 +118,21 @@ | |
13 | #endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */ | |
14 | ||
15 | /* increment ptr to next interface for next time through the loop */ | |
16 | +#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */ | |
17 | + switch(__ARCH__) { | |
18 | + case 32: /* 32 bits architectures */ | |
19 | + ptr += sizeof(ifr->ifr_name) + len; | |
20 | + break; | |
21 | + case 64: /* 64 bits architectures */ | |
22 | + ptr += sizeof(struct ifreq); | |
23 | + break; | |
24 | + default: /* Default dhcp_probe behavior */ | |
25 | + ptr += sizeof(ifr->ifr_name) + len; | |
26 | + break; | |
27 | + } | |
28 | +#else /* Default dhcp_probe behavior */ | |
29 | ptr += sizeof(ifr->ifr_name) + len; | |
30 | +#endif | |
31 | ||
32 | if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */ | |
33 | continue; |