On Fri, 2 Mar 2007, sonjaya wrote:

> Dear all
> 
> i try install chillispot in OBSD 4.0 , it try follow step in
> http://www.geeklan.co.uk/?p=72
> i try patch -p1  nothing show , so i try  compile manualy

You would have to compile manually in any event.

> # ./configure --prefix=/usr/local/chillispot
> # make
> make  all-recursive
> Making all in src
> if gcc -DHAVE_CONFIG_H -I. -I. -I..     -D_GNU_SOURCE -fno-builtin
> -DSBINDIR='"/usr/local/chilli/sbin"' -g -O2 -MT chilli.o -MD -MP -MF
> ".deps/chilli.Tpo" -c -o chilli.o chilli.c;  then mv -f
> ".deps/chilli.Tpo" ".deps/chilli.Po"; else rm -f ".deps/chilli.Tpo";
> exit 1; fi
> chilli.c: In function `process_options':
> chilli.c:734: warning: passing arg 2 of `inet_aton' from incompatible
> pointer type
> chilli.c:802: warning: passing arg 2 of `inet_aton' from incompatible
> pointer type
> chilli.c:820: warning: passing arg 2 of `inet_aton' from incompatible
> pointer type

Sloppy programming or a horrifying bug, probably just slack programming.

> if gcc -DHAVE_CONFIG_H -I. -I. -I..     -D_GNU_SOURCE -fno-builtin
> -DSBINDIR='"/usr/local/chilli/sbin"' -g -O2 -MT tun.o -MD -MP -MF
> ".deps/tun.Tpo" -c -o tun.o tun.c;  then mv -f ".deps/tun.Tpo"
> ".deps/tun.Po"; else rm -f ".deps/tun.Tpo"; exit 1; fi
> tun.c:369:29: missing binary operator before token "defined"

As is too often the case, this bit of Linux software was released
with software bugs -- it won't compile, was not tested before release,
unless Linux gcc comes with a --ignore-fatal-errors switch.  Perhaps
it does.

In your case, the patch you mentioned appears to be for a different
version of this slopware.  You should have suspected that when it
failed to apply.  That was your first error.  If a patch doesn't
work, find out *why*.  Find out why by examining the patch and the
thing it's alleged to patch.

The line giving your *first* error, line 369 of tun.c is this:

#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined ...

The obvious error is the missing binary operator "||", which belongs,
as the compiler told you, before "defined", thus:

#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined ...

This error occurs in several other places.

Hint:  This is NOT an OpenBSD problem.
Advice: Do not run C compilers until you know C.
Flame: Do not report bugs in C code without first *looking at the code*.
This bug is apparent without any knowledge of C, by the way.
Flame: Try, next time, to report the version of the software you're
trying to compile, its source (URL), and your efforts to fix the problem.
Hint: Do not download "development releases" of Linux software, and
expect them to work.  "Development" has a different meaning in that
world, often it means "broken and I can't fix it."  
Tip: Most malware for Linux likes the system V style make, which
is called "gmake" among the righteous.  Install the gmake package.

Go download the earlier version (from 2005), apply the patch and
try again.

You should report bugs to the laid-back slackers who would release
code with compiler errors in it (and who can't even spell "chile"
properly) and wait for them to fix it.  Since the release date of
this bugware was in September of last year, I wouldn't expect very
rapid response.

I wouldn't use code like that.  I'd be highly suspicious of code
with compiler errors that is supposed to be used for authentication.
I'd be highly suspicious of code that is not distributed with
checksums, too. (ftp is so ~old skool~).  I'd suspect somebody had
trojanned the thing.  Wireless authentication is a target of Evil
People, remember, and a penguin is easy meat for sharks.

Be thankful somebody *mean* didn't get to this first.

Dave the Patient

Reply via email to