On a mini mac ppc:
> cat /proc/version
Linux version 2.6.26-1-powerpc (Debian 2.6.26-13lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 Fri Mar 13 23:21:57 UTC 2009
Building resulted in:
> echo $?
0
But when trying to execute it, it gives me the help output all the time.
Did exactly the same thing on a x86:
> cat /proc/version
Linux version 2.6.26-1-686 (Debian 2.6.26-13lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Fri Mar 13 18:08:45 UTC 2009
and it worked.
I forgot to mention that it was the 0.11 user-space version I was trying with.
Same here, running Gentoo Linux x86 works, on Gentoo Linux arm l7-filter will only display a help screen.
Looking into the code i notice it is to do with the way l7-filter uses getopt. Patch I did works for me, please test.
--- l7-filter-userspace-0.11/l7-filter.cpp.old 2010-07-12 10:43:58.485002456 +0100
+++ l7-filter-userspace-0.11/l7-filter.cpp 2010-07-12 11:14:38.825001868 +0100
@@ -186,15 +186,11 @@
conffilename = "";
const char *opts = "f:q:vh?sb:dn:pⓂ️cz";
- int done = 0;
- while(!done)
+ int c;
+ while ((c = getopt (argc, argv, opts)) != -1)
{
- char c;
- switch(c = getopt(argc, argv, opts))
+ switch(c)
{
- case -1:
- done = 1;
- break;
case 'f':
conffilename = optarg;
break;
patch is busted due to formatting, it can be gotten from here
http://sourceforge.net/mailarchive/forum.php?thread_name=201007181603.43846.gavinlee303%40googlemail.com&forum_name=l7-filter-developers