The Samba-Bugzilla – Bug 7539
build via uClibc
Last modified: 2010-07-24 05:54:49 UTC
I am building Samab 3.4.8 with uClibc 0.9.29 and I get the following error.
cc1: warning: include location "/usr/local/include" is unsafe for
../source3/client/mount.cifs.c:42:19: error: fstab.h: No such file or
../source3/client/mount.cifs.c: In function 'check_fstab':
../source3/client/mount.cifs.c:266: error: '_PATH_FSTAB' undeclared
(first use in this function)
../source3/client/mount.cifs.c:266: error: (Each undeclared identifier
is reported only once
../source3/client/mount.cifs.c:266: error: for each function it appears in.)
commit 396eb03109400fe603c57a0a0d4bdc37c7131cf5 added the use of fstab.h
uClibc uses _PATH_MNTTAB from "paths.h" to define "/etc/fstab" which is
the same as _PATH_FSTAB.
I worked around the issue in our sources with the attached patch and use
"-DUCLIBC" when I build.
Created attachment 5816 [details]
This is how I fixed it to allow me to build.
This needs some changes to fit into configure, looking into this.
Hm, and here I thought accepting a bug would assign it to me. :)
I'd probably prefer to just switch the code to use paths.h and _PATH_MNTTAB universally if that works with glibc too (and it looks like it would).
Created attachment 5827 [details]
switch to using paths.h and _PATH_MNTTAB
Would this patch also work for you?
I should note that this is based on the mount.cifs in current cifs-utils repo, but it should be easily backportable to earlier releases.
(In reply to comment #5)
> Created an attachment (id=5827) [details]
> switch to using paths.h and _PATH_MNTTAB
> Would this patch also work for you?
works fine. Thanks.
Patch is now in git and should make the 4.6 release.