From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31709 invoked from network); 22 Jul 1999 16:48:08 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 22 Jul 1999 16:48:08 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA19605 for ; Thu, 22 Jul 1999 12:48:07 -0400 Received: by paralleldata.com from localhost (router,SLMail V2.5); Thu, 22 Jul 1999 11:52:53 -0500 Received: by paralleldata.com from paralleldata.com (207.136.50.246::mail daemon; unverified,SLMail V2.5); Thu, 22 Jul 1999 11:52:52 -0500 Sender: "Wsb" Message-ID: <37974B9F.1FF74058@paralleldata.com> Date: Thu, 22 Jul 1999 11:49:35 -0500 From: "Wes Bauske" Organization: PDS Inc. X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: SmbMount Compile Problem. References: <37972257.212E81CB@nac.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 /* 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