Gentoo Archives: gentoo-commits

From: "Victor Ostorga (vostorga)" <vostorga@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba/files/3.5: samba-3.5.8-uclib-build.patch
Date: Wed, 04 May 2011 16:36:17
Message-Id: 20110504163607.4463F20057@flycatcher.gentoo.org
1 vostorga 11/05/04 16:36:07
2
3 Added: samba-3.5.8-uclib-build.patch
4 Log:
5 Fix build on uclibc systems, bug 365233 patch thanks to Tom Lloyd <napalmllama@×××××.com>
6
7 (Portage version: 2.1.9.42/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 net-fs/samba/files/3.5/samba-3.5.8-uclib-build.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/files/3.5/samba-3.5.8-uclib-build.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/files/3.5/samba-3.5.8-uclib-build.patch?rev=1.1&content-type=text/plain
14
15 Index: samba-3.5.8-uclib-build.patch
16 ===================================================================
17 From a5bfd634ecd0e81eb92b065da311ee4cf6f08757 Mon Sep 17 00:00:00 2001
18 From: Jeff Layton <jlayton@×××××.org>
19 Date: Mon, 5 Jul 2010 08:39:45 -0400
20 Subject: [PATCH] mount.cifs: switch to using _PATH_MNTTAB and paths.h
21
22 The code currently uses fstab.h and _PATH_FSTAB, but uClibc apparently
23 doesn't have that header. It does have paths.h and _PATH_MNTTAB however
24 and so does glibc, so use that instead.
25
26 Reported-by: Armin Kuster <linux@×××××××××.net>
27 Signed-off-by: Jeff Layton <jlayton@×××××.org>
28 ---
29 diff -NrU5 samba-3.5.8.original/client/mount.cifs.c samba-3.5.8/client/mount.cifs.c
30 --- samba-3.5.8.original/client/mount.cifs.c 2011-03-06 12:48:05.000000000 -0600
31 +++ samba-3.5.8/client/mount.cifs.c 2011-05-04 08:51:42.000000000 -0600
32 @@ -37,11 +37,11 @@
33 #include <netdb.h>
34 #include <string.h>
35 #include <mntent.h>
36 #include <fcntl.h>
37 #include <limits.h>
38 -#include <fstab.h>
39 +#include <paths.h>
40 #include "mount.h"
41
42 #define MOUNT_CIFS_VERSION_MAJOR "1"
43 #define MOUNT_CIFS_VERSION_MINOR "14"
44
45 @@ -261,14 +261,14 @@
46 {
47 FILE *fstab;
48 struct mntent *mnt;
49
50 /* make sure this mount is listed in /etc/fstab */
51 - fstab = setmntent(_PATH_FSTAB, "r");
52 + fstab = setmntent(_PATH_MNTTAB, "r");
53 if (!fstab) {
54 fprintf(stderr, "Couldn't open %s for reading!\n",
55 - _PATH_FSTAB);
56 + _PATH_MNTTAB);
57 return EX_FILEIO;
58 }
59
60 while((mnt = getmntent(fstab))) {
61 if (!strcmp(mountpoint, mnt->mnt_dir))
62 @@ -277,11 +277,11 @@
63 endmntent(fstab);
64
65 if (mnt == NULL || strcmp(mnt->mnt_fsname, devname)) {
66 fprintf(stderr, "%s: permission denied: no match for "
67 "%s found in %s\n", progname, mountpoint,
68 - _PATH_FSTAB);
69 + _PATH_MNTTAB);
70 return EX_USAGE;
71 }
72
73 /*
74 * 'mount' munges the options from fstab before passing them