Skip Menu |

This queue is for tickets about the Filesys-SmbClient CPAN distribution.

Report information
The Basics
Id: 12221
Status: resolved
Priority: 0/
Queue: Filesys-SmbClient

People
Owner: Nobody in particular
Requestors: david.morel [...] intradot.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.0
Fixed in: 3.1



Subject: compile error on Debian Sarge
I get the following error preventing compilation: SmbClient.xs:191:60: la macro « readdir » a reçu 2 arguments, mais elle n'en prend que 1 samba version 3.10Debian (on Debian 3.1 aka Sarge) perl version:5.8.4 Linux 2.6.8-1-686 #1 Thu Nov 25 04:34:30 UTC 2004 i686 GNU/Linux
From: edspambox [...] yahoo.com
I get the same error on Fedora Core 3. SmbClient.xs:191:60: macro "readdir" passed 2 arguments, but takes just 1 make: *** [SmbClient.o] Error 1 Ed [guest - Sat Apr 9 16:53:22 2005]: Show quoted text
> I get the following error preventing compilation: > SmbClient.xs:191:60: la macro « readdir » a reçu 2 arguments, mais > elle n'en prend que 1 > > samba version 3.10Debian (on Debian 3.1 aka Sarge) > perl version:5.8.4 > Linux 2.6.8-1-686 #1 Thu Nov 25 04:34:30 UTC 2004 i686 GNU/Linux
From: dpavlin [...] rot13.org
Show quoted text
> SmbClient.xs:191:60: macro "readdir" passed 2 arguments, but takes just 1
Quick fix is to insert #undef readdir just above line 191 like this: --- SmbClient.xs.orig 2005-04-29 13:52:37.000000000 +0200 +++ SmbClient.xs 2005-04-29 14:58:52.000000000 +0200 @@ -188,6 +188,7 @@ #ifdef VERBOSE fprintf(stderr, "! Filesys::SmbClient : _readdir: %d\n", fd); #endif +#undef readdir dirp = (struct smbc_dirent *)context->readdir(context, fd); if (dirp) { XPUSHs(sv_2mortal(newSVnv(dirp->smbc_type))); This particular readdir macro comes from one of following places: /usr/include/dirent.h:160:# define readdir readdir64 /usr/include/dirent.h:186:# define readdir_r readdir64_r /usr/lib/perl/5.8/CORE/config.h:3969:#define READDIR64_R_PROTO REENTRANT_PROTO_I_TSR /**/ /usr/lib/perl/5.8/CORE/config.h:3982:#define READDIR_R_PROTO REENTRANT_PROTO_I_TSR /**/ /usr/lib/perl/5.8/CORE/reentr.inc:1322:# define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0) /usr/lib/perl/5.8/CORE/reentr.inc:1325:# define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct) == 0 ? PL_reentrant_buffer->_readdir_struct : 0) /usr/lib/perl/5.8/CORE/reentr.inc:1332:# define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0) /usr/lib/perl/5.8/CORE/reentr.inc:1335:# define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0) /usr/lib/perl/5.8/CORE/XSUB.h:391:# define readdir PerlDir_read
Le Ven. Avr. 29 09:10:29 2005, DPAVLIN a écrit : Show quoted text
> > SmbClient.xs:191:60: macro "readdir" passed 2 arguments, but takes
just 1 Show quoted text
> > Quick fix is to insert #undef readdir just above line 191 like this:
Thank you, fixed in next release