Bug 7539 - build via uClibc
Summary: build via uClibc
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: user space tools (show other bugs)
Version: 2.6
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-06-30 10:22 UTC by Armin Kuster
Modified: 2010-07-24 05:54 UTC (History)
2 users (show)

See Also:

work around (509 bytes, patch)
2010-06-30 10:24 UTC, Armin Kuster
no flags Details
switch to using paths.h and _PATH_MNTTAB (1.65 KB, patch)
2010-07-05 07:44 UTC, Jeff Layton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Kuster 2010-06-30 10:22:30 UTC
I am building Samab 3.4.8 with uClibc 0.9.29 and I get the following error.

Compiling client/mount.cifs.c
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.
Comment 1 Armin Kuster 2010-06-30 10:24:30 UTC
Created attachment 5816 [details]
work around

This is how I fixed it to allow me to build.
Comment 2 Kai Blin 2010-07-02 15:22:27 UTC
This needs some changes to fit into configure, looking into this.
Comment 3 Kai Blin 2010-07-02 15:23:26 UTC
Hm, and here I thought accepting a bug would assign it to me. :)
Comment 4 Jeff Layton 2010-07-05 07:34:57 UTC
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).
Comment 5 Jeff Layton 2010-07-05 07:44:00 UTC
Created attachment 5827 [details]
switch to using paths.h and _PATH_MNTTAB

Would this patch also work for you?
Comment 6 Jeff Layton 2010-07-05 07:44:49 UTC
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.
Comment 7 Armin Kuster 2010-07-06 14:15:21 UTC
(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.
Comment 8 Jeff Layton 2010-07-24 05:54:49 UTC
Patch is now in git and should make the 4.6 release.