Has anyone had any luck compiling and installing Samba 3.0.24 on Ubuntu 10.04? I'm trying to set up realtime virus scanning on Samba shares (ClamAV) using the legacy version of Samba as it is the latest release supported by samba-vscan-0.3.6b. I'm no expert at this but I think I have all of the dependencies covered and I'm following the documentation with the source code but I'm getting errors as if there is a problem with the source code.

I downloaded the source directly from http://ftp.samba.org/pub/samba/stable/samba-3.0.24.tar.gz

After running ./configure and make, I get the following error.

Compiling client/mount.cifs.c
client/mount.cifs.c: In function ‘main’:
client/mount.cifs.c:1068: error: ‘PATH_MAX’ undeclared (first use in this function)
client/mount.cifs.c:1068: error: (Each undeclared identifier is reported only once
client/mount.cifs.c:1068: error: for each function it appears in.)
make: *** [client/mount.cifs.o] Error 1

You can view the full output log here.

Can anyone help me get this installed or suggest another means of implementing realtime virus scanning on Samba shares?


Edit the source file client/mount.cifs.c and add

#ifndef PATH_MAX
#define PATH_MAX 256

I added it under

#ifndef _GNU_SOURCE
#define _GNU_SOURCE

not sure if it matters, but that made that error go away and finish making.

Note. I found references to that value beeing 256 and others of it beeing 1024, unsure of what the difference is, i tried 256 and it installed

| improve this answer | |
  • Brilliant! That did it. I was able to make my way through the install. – Nilpo Apr 8 '12 at 5:17
  • Cool, glad it helped :) – geermc4 Apr 9 '12 at 6:13
  • Note that there are various serious open security issues in 3.0.24, as Samba 3.0 is no longer receiving security fixes. – jelmer Apr 15 '12 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.