Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: SmbMount Compile Problem.
Date: Thu, 22 Jul 1999 11:49:35 -0500	[thread overview]
Message-ID: <37974B9F.1FF74058@paralleldata.com> (raw)
In-Reply-To: 37972257.212E81CB@nac.net

jimmyc wrote:
> 
> I am still having problems with smbmount.
> When I compile it is says:
> 
> [root@what source]# make bin/smbmount
> Compiling client/smbmount.c
> client/smbmount.c: In function `close_our_files':
> client/smbmount.c:242: `NR_OPEN' undeclared (first use in this function)
> 
> client/smbmount.c:242: (Each undeclared identifier is reported only once
> 
> client/smbmount.c:242: for each function it appears in.)
> make: *** [client/smbmount.o] Error 1
> [root@what source]#
> 
> What do I do??
> Has anyone else has this problem.

It's mucked with in /usr/include/bits/local_lim.h.

The real value is in /usr/include/linux/limits.h:

#define NR_OPEN         1024


Don't know why the "bits" files are screwing with it.

When you have missing variables, you can check the source
tree for them with:

find the_dir_you_want_to_scan -print -exec grep string_to_find {} \;

This starts at the specified directory and greps for the string in
every file under that directory. Also, it's good to do the same
starting at /usr/include. It's the quickest way I know of to find
problems like that. Then all you have to do is figure out what flag
to turn on to get the defines you want. In this case, the bits file says:

/* The kernel header pollutes the namespace with the NR_OPEN symbol.
   Remove this after including the header if necessary.  */
#ifndef NR_OPEN
# define __undef_NR_OPEN
#endif

/* The kernel sources contain a file with all the needed information.  */
#include <linux/limits.h>

/* Have to remove NR_OPEN?  */
#ifdef __undef_NR_OPEN
# undef NR_OPEN
# undef __undef_NR_OPEN
#endif

Which I take to mean your average program shouldn't want to pick
up that define. Apparently, the loop in the code is attempting to
use the variable instead of actually keeping track of what files
are open and is blindly closing all possible file connections.
That starts to sound a bit flakey.

How to fix it? How about:

#if __alpha__
#define NR_OPEN   1024
#endif


Wes


  reply	other threads:[~1999-07-22 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-22 13:53 SmbMount Compile Problem jimmyc
1999-07-22 16:49 ` Wes Bauske [this message]
1999-07-22 17:31   ` jimmyc
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox