Re: [RELEASE] ebtables version 2.0.8-rc3
Carl-Daniel Hailfinger <[email protected]> Tue, 19 Dec 2006 14:44:38 +0100
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Bart,
the -fPIC problem on x86_64 is still there:
# make
[...]
ld -shared -soname libebtc.so -o libebtc.so -lc getethertype.o communication.o libebtc.o useful_functions.o ebtables.o
ld: ebtables.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
ebtables.o: could not read symbols: Bad value
make: *** [libebtc] Error 1
If you need more information about the problem, please take a look at
http://www.x86-64.org/lists/discuss/msg05760.html .
Besides that, I get these warnings:
ebtables.c: In function `list_em':
ebtables.c:324: warning: long long unsigned int format, uint64_t arg (arg 2)
ebtables.c:324: warning: long long unsigned int format, uint64_t arg (arg 3)
ebtables.c:326: warning: long long unsigned int format, uint64_t arg (arg 2)
ebtables.c:326: warning: long long unsigned int format, uint64_t arg (arg 3)
extensions/ebt_among.c: In function `parse':
extensions/ebt_among.c:348: warning: implicit declaration of function `close'
This patch fixes them:
--- ebtables-v2.0.8-rc3/ebtables.c 2006-12-17 22:27:17.000000000 +0100
+++ ebtables-v2.0.8-rc3-modified/ebtables.c 2006-12-19 13:24:41.000000000 +0100
@@ -321,9 +321,9 @@
uint64_t bcnt = hlp->cnt.bcnt;
if (replace->flags & LIST_X)
- printf("-c %llu %llu", pcnt, bcnt);
+ printf("-c %llu %llu", (unsigned long long)pcnt, (unsigned long long)bcnt);
else
- printf(", pcnt = %llu -- bcnt = %llu", pcnt, bcnt);
+ printf(", pcnt = %llu -- bcnt = %llu", (unsigned long long)pcnt, (unsigned long long)bcnt);
}
printf("\n");
hlp = hlp->next;
diff -urN ebtables-v2.0.8-rc3/extensions/ebt_among.c ebtables-v2.0.8-rc3-modified/extensions/ebt_among.c
--- ebtables-v2.0.8-rc3/extensions/ebt_among.c 2006-12-17 22:27:17.000000000 +0100
+++ ebtables-v2.0.8-rc3-modified/extensions/ebt_among.c 2006-12-19 13:08:15.000000000 +0100
@@ -7,6 +7,7 @@
*/
#include <stdio.h>
+#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
Explanation: uint64_t is unsigned long long on i386, but unsigned long
on x86_64.
The problems of creating rules on x86_64 is still there. However, it seems
that Al Viro has fixed something in this area:
http://www2.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bb2ef25c2c62444b8fdb0346a23658a419803df9
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV