[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> > > First, for compilation I needed to include <linux/limits.h> rather
> > > than <limits.h>.
> > > I'm running Debian `woody' and the header files distributed with Debian
> > > might differ from your development installation.
> >
> > I find this surprising.  I think there's something wrong with your compiler
> > setup.  lookup_program is just a normal piece of plain C, and shouldn't need
> > kernel headers for anything.  What error message do you get?
> 

The problem is the need to close all open file descriptors except
stdin/stdout/stderr.

        -hpa

> The error is:
> 
> gcc -shared -O3 -fomit-frame-pointer -Wall -I../include -fpic 
>-DAUTOFS_LIB_DIR=\"/usr/lib/autofs\" -DPATH_AUTOMOUNT=\"/usr/sbin/automount\" -o 
>lookup_program.so lookup_program.c
> lookup_program.c: In function `lookup_mount':
> lookup_program.c:146: `OPEN_MAX' undeclared (first use in this function)
> lookup_program.c:146: (Each undeclared identifier is reported only once
> lookup_program.c:146: for each function it appears in.)
> make[1]: *** [lookup_program.so] Error 1
> 
> I'm using Debian woody with:
> 
> % dpkg -l libc6-dev
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> ii  libc6-dev      2.1.96-1       GNU C Library: Development Libraries and Hea
> 
> Thanks,
> 
> --
> Frederic.R.Roussel
> Lead Software Engineer       -o)                                    (o-
> [EMAIL PROTECTED]     /\\  Join the penguin force  (o_  (o_  //\
> (650) 357 3329              _\_v   The Linux G3N3R47!0N   (/)_ (/)_ v_/_

-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

Reply via email to