Gentoo Archives: gentoo-commits

From: "Michael Haubenwallner (haubi)" <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout-prefix/files: baselayout-1.12.5-gnulib.patch baselayout-1.12.5-libsvar.patch
Date: Thu, 31 Mar 2011 16:21:38
Message-Id: 20110331162127.32F1320057@flycatcher.gentoo.org
1 haubi 11/03/31 16:21:27
2
3 Added: baselayout-1.12.5-gnulib.patch
4 Removed: baselayout-1.12.5-libsvar.patch
5 Log:
6 Take strndup from gnulib too, breaks on Linux (#361417).
7 Rename libsvar.patch to more generic gnulib.patch.
8
9 (Portage version: 2.2.01.18125-prefix/cvs/AIX 00C0078A4C00)
10
11 Revision Changes Path
12 1.1 sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch?rev=1.1&content-type=text/plain
16
17 Index: baselayout-1.12.5-gnulib.patch
18 ===================================================================
19 Need to add libraries after object files, or solaris
20 linker might not see library's symbols to be needed
21 when added to LDFLAGS.
22
23 Take strndup from gnulib too, this decl breaks on Linux (#361417).
24
25 VERSION is defined in gnulib's config.h.
26
27 --- src/Makefile.orig 2011-03-30 13:15:56 +0200
28 +++ src/Makefile 2011-03-30 13:16:52 +0200
29 @@ -30,10 +30,10 @@
30 $(CC) $(CFLAGS) -c -o $@ $^
31
32 runscript: runscript.o rs-misc.o
33 - $(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_RS)
34 + $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_RS)
35
36 start-stop-daemon: start-stop-daemon.c
37 - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD)
38 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_SSD)
39
40 install: $(TARGET)
41 install -m 0755 -d $(DESTDIR)/bin
42 --- src/core/misc.c.orig 2011-03-31 17:46:46 +0200
43 +++ src/core/misc.c 2011-03-31 17:47:03 +0200
44 @@ -86,31 +86,6 @@
45 return new_path;
46 }
47
48 -char *strndup(const char *str, size_t size) {
49 - char *new_str = NULL;
50 - size_t len;
51 -
52 - if (NULL == str) {
53 - DBG_MSG("Invalid argument passed!\n");
54 - errno = EINVAL;
55 - return NULL;
56 - }
57 -
58 - /* Check lenght of str without breaching the size limit */
59 - for (len = 0;(len < size) && ('\0' != str[len]);len++);
60 -
61 - new_str = malloc(len + 1);
62 - if (NULL == new_str) {
63 - DBG_MSG("Failed to allocate buffer!\n");
64 - return NULL;
65 - }
66 -
67 - /* Make sure our string is NULL terminated */
68 - new_str[len] = '\0';
69 -
70 - return (char *)memcpy(new_str, str, len);
71 -}
72 -
73 char *gbasename(const char *path) {
74 char *new_path = NULL;
75
76 --- src/core/misc.h.orig 2011-03-31 17:46:43 +0200
77 +++ src/core/misc.h 2011-03-31 18:06:58 +0200
78 @@ -246,8 +246,6 @@
79 * with the malloc() call. */
80 char *strcatpaths(const char *pathname1, const char *pathname2);
81
82 -/* Compat functions for GNU extensions */
83 -char *strndup(const char *str, size_t size);
84 /* Same as basename(3), but do not modify path */
85 char *gbasename(const char *path);
86
87 --- src/start-stop-daemon.c.orig 2011-03-31 18:11:02 +0200
88 +++ src/start-stop-daemon.c 2011-03-31 18:11:03 +0200
89 @@ -31,6 +31,7 @@
90 *
91 */
92
93 +#undef VERSION
94 #define VERSION "1.13.11+gentoo"
95
96 #define NONRETURNPRINTFFORMAT(x, y) \